Python Program to Remove Whitespace From String Using strip() Function
# Remove Whitespace From String in Python Using strip() Function my_string = " Python " # strip() removes the leading and trailing characters including the whitespaces from a string. print(my_string.strip())
Output:
Python