Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python trim leading and trailing whitespace()

Use the strip() method
Example

>>> name = '  Steve  ' 
>>> name
'  Steve  '
>>> name = name.strip()
>>> name
'Steve'
Source by codinggear.blog #
 
PREVIOUS NEXT
Tagged: #Python #trim #leading #trailing
ADD COMMENT
Topic
Name
8+5 =