Skip to content

Instantly share code, notes, and snippets.

@zoni
Created August 18, 2012 18:32
Show Gist options
  • Select an option

  • Save zoni/3388918 to your computer and use it in GitHub Desktop.

Select an option

Save zoni/3388918 to your computer and use it in GitHub Desktop.
asciionly
def asciionly(input):
"""Return only us-ascii characters from input string"""
return ''.join([x for x in input if ord(x) < 128])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment