Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Trim trailing whitespace in Python

Use the lstrip() method

>>> name = '  Steve  ' 
>>> name
'  Steve  '
>>> name = name.lstrip()
>>> name
'Steve  '
Source by codinggear.blog #
 
PREVIOUS NEXT
Tagged: #Trim #trailing #whitespace #Python
ADD COMMENT
Topic
Name
2+2 =