Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python strip

# removes outside whitespace/characters
'  hey  '.strip()     # "hey"
'  hey  '.lstrip()    # "hey  "
'  hey  '.rstrip()    # "  hey"
'_.hey__'.strip('._') # "hey"
 
PREVIOUS NEXT
Tagged: #python #strip
ADD COMMENT
Topic
Name
1+8 =