strip use python code example
Example 1: strip in python
txt = " banana "
x = txt.strip()
#x will be "banana"
Example 2: .strip() python
string = ' xoxo love xoxo '
# Leading and trailing whitespaces are removed
print(string.strip())
# All <whitespace>,x,o,e characters in the left
# and right of string are removed
print(string.strip(' xoe'))
# Argument doesn't contain space
# No characters are removed.
print(string.strip('stx'))
string = 'android is awesome'
print(string.strip('an'))