Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python remove spaces

#If you want to remove LEADING and ENDING spaces, use str.strip():

sentence = ' hello  apple'
sentence.strip()
>>> 'hello  apple'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #remove #spaces
ADD COMMENT
Topic
Name
5+8 =