Created
October 4, 2011 00:18
-
-
Save zackdever/1260608 to your computer and use it in GitHub Desktop.
python string collapse - removes white space at beginning and end of lines and replace newline with a single space
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: http://stackoverflow.com/questions/1249786/is-there-a-string-collapse-library-function-in-python | |
' '.join(multilineinput.split()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment