Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python remove white space

>>> '     hello world!    '.strip() #remove both
'hello world!'

>>> '     hello world!'.lstrip() #remove leading whitespace
'hello world!'
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #python #remove #white #space
ADD COMMENT
Topic
Name
1+1 =