Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Trim leading whitespace in Python

Use the rstrip() method
Example

>>> name = '  Steve  ' 
>>> name
'  Steve  '
>>> name = name.rstrip()
>>> name
'  Steve'
Source by codinggear.blog #
 
PREVIOUS NEXT
Tagged: #Trim #leading #whitespace #Python
ADD COMMENT
Topic
Name
3+9 =