Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 22)
22.
How can you remove leading and trailing whitespaces from a string?
str.trim()
trim(str)
str.strip()
remove_whitespaces(str)
Answer: Option
Explanation:
The strip() method in Python is used to remove leading and trailing whitespaces from a string.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.