Last active
October 26, 2017 07:15
-
-
Save Lh4cKg/d11f12cbd3ba95aa209c6b3b5e0afe8c to your computer and use it in GitHub Desktop.
Georgian Alphabet Range
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
# Python 2.x | |
for x in [unichr(i) for i in range(ord(u'ა'),ord(u'ჰ') +1)]: | |
pattern = unicode("!@#$%^&*()_+=-~`[]\{}|:\"?><,./;'\`„\"") | |
char = re.sub('[%s]' % re.escape(''.join(pattern)), '', x.strip()) | |
print char | |
# Python 3.x | |
for x in [chr(i) for i in range(ord('ა'),ord('ჰ') +1)]: | |
pattern = "!@#$%^&*()_+=-~`[]\{}|:\"?><,./;'\`„\"" | |
char = re.sub('[%s]' % re.escape(''.join(pattern)), '', x.strip()) | |
print(char) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment