Skip to content

Instantly share code, notes, and snippets.

@Lh4cKg
Last active October 26, 2017 07:15
Show Gist options
  • Save Lh4cKg/d11f12cbd3ba95aa209c6b3b5e0afe8c to your computer and use it in GitHub Desktop.
Save Lh4cKg/d11f12cbd3ba95aa209c6b3b5e0afe8c to your computer and use it in GitHub Desktop.
Georgian Alphabet Range
# 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