Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove all whitespace from string python

import re
s = '
 	 this is a string   with a lot of whitespace	'
s = re.sub('s+', '', s)
 
PREVIOUS NEXT
Tagged: #remove #whitespace #string #python
ADD COMMENT
Topic
Name
2+6 =