Skip to content

Instantly share code, notes, and snippets.

@dwillis
Created January 10, 2012 17:28
Show Gist options
  • Save dwillis/1590132 to your computer and use it in GitHub Desktop.
Save dwillis/1590132 to your computer and use it in GitHub Desktop.
>>> str = 'this has multiple spaces in multiple places'
>>> " ".join(str.split())
'this has multiple spaces in multiple places'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment