Define strip ([chars]) with its syntax
Answers
Answered by
5
strip() in-built function of Python is used to remove all the leading and trailing spaces from a string. ... The function can take one or no parameter. If no parameter is passed then only the leading and trailing spaces are removed.
Answered by
1
strip ([chars]) with its syntax
- Python string method strip() yields a copy of the string in which every chars have been peeled from the start and the end of the string.
- Syntax for this method is str.strip([chars]) where chars express the characters to be excluded from the origin or end of the string.
- The strip() eliminates characters from both left and right based on the contention.
- If chars are ignored or None, the chars argument defaults to eliminating whitespace.
- The chars argument is not a prefix; preferably, all sequences of its values are removed.
Learn more on strip ([chars]):
https://brainly.in/question/14293841
Python program remove all the lines that contain the character a' in a file and write it to another file
Similar questions
Math,
5 months ago
English,
5 months ago
Accountancy,
5 months ago
Computer Science,
9 months ago
Math,
1 year ago