Skip to content

Instantly share code, notes, and snippets.

@Grumblesaur
Last active October 27, 2015 21:52
Show Gist options
  • Save Grumblesaur/984f763058fe81d39d9c to your computer and use it in GitHub Desktop.
Save Grumblesaur/984f763058fe81d39d9c to your computer and use it in GitHub Desktop.
Invert a string of binary characters (ASCII 1s and 0s).
lambda s:''.join(['10'[c>'0']for c in s])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment