Remove Whitespace from Text in Python
the strip() function deletes white spaces from the beginning or from the end of a string.
strip() method
a = "Hello, its time to learn, LearDuty "
print(a.strip())
Output:
Hello, its time to learn, LearDuty
the strip() function deletes white spaces from the beginning or from the end of a string.
a = "Hello, its time to learn, LearDuty "
print(a.strip())
Output:
Hello, its time to learn, LearDuty