Skip to content

Instantly share code, notes, and snippets.

@c0ldlimit
Last active October 12, 2015 23:08
Show Gist options
  • Save c0ldlimit/4101461 to your computer and use it in GitHub Desktop.
Save c0ldlimit/4101461 to your computer and use it in GitHub Desktop.
Python: Stripping all whitespace #python #c0ldlimit #whitespace
s = " \t foo \n bar "
"".join(s.split())
#http://stackoverflow.com/questions/3739909/how-to-strip-all-whitespace-from-string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment