original_string = " Python is fun! " trimmed_string = original_string.strip() print(f"Original String: '{original_string}'\nTrimmed String: '{trimmed_string}'")
Output:
Original String: ‘ Python is fun! ‘
Trimmed String: ‘Python is fun!’
original_string = " Python is fun! " trimmed_string = original_string.strip() print(f"Original String: '{original_string}'\nTrimmed String: '{trimmed_string}'")
Output:
Original String: ‘ Python is fun! ‘
Trimmed String: ‘Python is fun!’