what is the use of strip() function in python
Answers
Answered by
4
Answer:
The strip() method returns a copy of the string by removing both the leading and the trailing characters (based on the string argument passed). The strip() method removes characters from both left and right based on the argument (a string specifying the set of characters to be removed).
Answered by
4
The strip() method returns a copy of the string by removing both the leading and the trailing characters (based on the string argument passed). The strip() method removes characters from both left and right based on the argument (a string specifying the set of characters to be removed).
The strip() method removes any leading (spaces at the beginning) and trailing (spaces at the end) characters (space is the default leading character to remove)
Similar questions