Skip to content

Instantly share code, notes, and snippets.

@gartenfeld
Created January 19, 2015 00:14
Show Gist options
  • Save gartenfeld/1ee3b8b1b8b6f41866aa to your computer and use it in GitHub Desktop.
Save gartenfeld/1ee3b8b1b8b6f41866aa to your computer and use it in GitHub Desktop.
new_string = re.sub(r' +',' ',old_string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment