Skip to content

Instantly share code, notes, and snippets.

@tonytan4ever
Created January 26, 2017 15:34
Show Gist options
  • Save tonytan4ever/9d4e641641d933251fdc6edb35edc049 to your computer and use it in GitHub Desktop.
Save tonytan4ever/9d4e641641d933251fdc6edb35edc049 to your computer and use it in GitHub Desktop.
if a unicode character exists in a string
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