Skip to content

Instantly share code, notes, and snippets.

@turing4ever
Created March 15, 2018 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save turing4ever/5c3b3dc3701f985665df6e63eb713742 to your computer and use it in GitHub Desktop.
Save turing4ever/5c3b3dc3701f985665df6e63eb713742 to your computer and use it in GitHub Desktop.
check if a string contains only ascii
def is_ascii(s):
return all(ord(c) < 128 for c in s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment