Name

.strip()

Examples
a = '              ...here...             '
# If no arguments are given strip() removes leading and trailing whitespace.
a = a.strip()
print(a)             # Prints '...here...'
aNoDots = a.strip('.') # Removes leading and trailing instances of '.'.
print(aNoDots)       # Prints 'here'
Description
Syntax
a.strip()
a.strip(chars)
Parameters
chars
Related string
String Formatting
.find()
.join()
.split()
.replace()
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License