Created
January 26, 2017 15:34
-
-
Save tonytan4ever/9d4e641641d933251fdc6edb35edc049 to your computer and use it in GitHub Desktop.
if a unicode character exists in a string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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