DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
remove extra spaces and empty lines from string python
" ".join([s for s in code.split(" ") if s])
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#remove
#extra
#spaces
#empty
#lines
#string
#python
ADD COMMENT
Topic
COMMENT
Name
3+7 =
Submit