To get a character value you can use the ord(char) buildin function.

In your case, something like this should works:

strings = [u'ग',u'1ए',u'==क',u'@',u'ऊं',u'abc123',u'η',u'θ',u'abcशि']
for string in strings:
    for char in string:
        if ord(u'\u0900') <= ord(char) <= ord(u'\u097F'):
            print(char)

The ord(char) function is available for both Python 2 and Python 3

https://docs.python.org/2.7/howto/unicode.html

Answer from Ceppo93 on Stack Overflow
🌐
Real Python
realpython.com › python-encodings-guide
Unicode & Character Encodings in Python: A Painless Guide – Real Python
May 20, 2019 - But the interesting side of things is that, because Python 3 is Unicode-centric through and through, you can “type” Unicode characters that you probably won’t even find on your keyboard. You can copy and paste this right into a Python 3 interpreter shell: ... >>> alphabet = 'αβγδεζηθικλμνξοπρςστυφχψ' >>> print(alphabet) αβγδεζηθικλμνξοπρςστυφχψ
🌐
Python documentation
docs.python.org › 3 › howto › unicode.html
Unicode HOWTO — Python 3.14.7 documentation
Release, 1.12,. This HOWTO discusses Python’s support for the Unicode specification for representing textual data, and explains various problems that people commonly encounter when trying to work w...
People also ask

How do I get the alphabet in Python?
Use string.ascii_lowercase or string.ascii_uppercase for the 26 lowercase or uppercase English ASCII letters.
🌐
pythonpool.com
pythonpool.com › home › tutorials › python alphabet: ascii letters, chr(), ord(), and unicode
Python Alphabet: ASCII Letters, chr(), ord(), and Unicode
How do I generate alphabet letters with chr()?
Use chr() over a range from ord('a') through ord('z'), or the equivalent uppercase code-point range.
🌐
pythonpool.com
pythonpool.com › home › tutorials › python alphabet: ascii letters, chr(), ord(), and unicode
Python Alphabet: ASCII Letters, chr(), ord(), and Unicode
Does isalpha() check only English letters?
No. str.isalpha() is Unicode-aware and can accept alphabetic characters outside the 26-letter ASCII English alphabet.
🌐
pythonpool.com
pythonpool.com › home › tutorials › python alphabet: ascii letters, chr(), ord(), and unicode
Python Alphabet: ASCII Letters, chr(), ord(), and Unicode
🌐
Stack Overflow
stackoverflow.com › questions › 54082902 › printing-the-unicode-of-all-the-letters-in-a-word
python - Printing the unicode of all the letters in a word - Stack Overflow
If so you could check ASCII values using python builtin function ord(). userInput = input("Enter a word: ") for i in userInput: print('{}: {}'.format(i, ord(i))) ... Find the answer to your question by asking. Ask question ... See similar questions with these tags. ... Please welcome V2Blast back to the Community Team! ... What sort of astronomical natural disasters could a Type II-III civilization NOT anticipate or avert?
🌐
Python
docs.python.org › 3.1 › howto › unicode.html
Unicode HOWTO — Python v3.1.5 documentation
Unicode started out using 16-bit characters instead of 8-bit characters. 16 bits means you have 2^16 = 65,536 distinct values available, making it possible to represent many different characters from many different alphabets; an initial goal was to have Unicode contain the alphabets for every ...
🌐
Python Pool
pythonpool.com › home › tutorials › python alphabet: ascii letters, chr(), ord(), and unicode
Python Alphabet: ASCII Letters, chr(), ord(), and Unicode
July 13, 2026 - No. str.isalpha() is Unicode-aware and can accept alphabetic characters outside the 26-letter ASCII English alphabet. Define the allowed characters explicitly, normalize case if appropriate, and test each character for membership in the allowed set. ... Python Pool is a platform where you can learn and become an expert in every aspect of Python programming language as well as in AI, ML, and Data Science.
🌐
Pythonforundergradengineers
pythonforundergradengineers.com › unicode-characters-in-python.html
Unicode characters for engineers in Python - Python for Undergraduate Engineers
December 29, 2017 - To print any character in the Python interpreter, use a \u to denote a unicode character and then follow with the character code. For instance, the code for β is 03B2, so to print β the command is print('\u03B2'). There are a couple of special characters that will combine symbols.
Find elsewhere
🌐
Python
docs.python.org › 3.3 › howto › unicode.html
Unicode HOWTO — Python 3.3.7 documentation
September 19, 2017 - Unicode started out using 16-bit characters instead of 8-bit characters. 16 bits means you have 2^16 = 65,536 distinct values available, making it possible to represent many different characters from many different alphabets; an initial goal was to have Unicode contain the alphabets for every ...
🌐
Wikipedia
en.wikipedia.org › wiki › List_of_Unicode_characters
List of Unicode characters - Wikipedia
1 day ago - 11 Control-Z has commonly been ... / Linux systems use Control-D to indicate end-of-file at a terminal. The Unicode Standard (version 17.0) classifies 1,492 characters as belonging to the Latin script. 95 characters; the 52 alphabet characters belong to the Latin ...
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-work-with-unicode-in-python
How To Work with Unicode in Python | DigitalOcean
The tutorial will cover the basics of Unicode in Python and how Python interprets Unicode characters. It covers the concepts of unicodedata and how to use th…
🌐
Note.nkmk.me
note.nkmk.me › home › python
Convert Between Unicode Code Point and Character: chr, ord | note.nkmk.me
January 31, 2024 - In Python, the built-in chr() and ord() functions allow you to convert between Unicode code points and characters. Additionally, in string literals, characters can be represented by their hexadecimal Unicode code points using \x, \u, or \U. ...
🌐
TheLinuxCode
thelinuxcode.com › home › alphabet range in python: practical patterns, unicode reality, and production-ready helpers
Alphabet Range in Python: Practical Patterns, Unicode Reality, and Production-Ready Helpers – TheLinuxCode
January 22, 2026 - I use this when chunking logs or exports. ... I’ve used this to distribute assets or cache keys by first letter. ... Many production bugs come from assuming that a..z is all you need. For user input, that’s often wrong. Python uses Unicode, which means there are letters outside the ASCII range.
Top answer
1 of 10
175

To include Unicode characters in your Python source code, you can use Unicode escape characters in the form \u0123 in your string. In Python 2.x, you also need to prefix the string literal with 'u'.

Here's an example running in the Python 2.x interactive console:

>>> print u'\u0420\u043e\u0441\u0441\u0438\u044f'
Россия

In Python 2, prefixing a string with 'u' declares them as Unicode-type variables, as described in the Python Unicode documentation.

In Python 3, the 'u' prefix is now optional:

>>> print('\u0420\u043e\u0441\u0441\u0438\u044f')
Россия

If running the above commands doesn't display the text correctly for you, perhaps your terminal isn't capable of displaying Unicode characters.

These examples use Unicode escapes (\u...), which allows you to print Unicode characters while keeping your source code as plain ASCII. This can help when working with the same source code on different systems. You can also use Unicode characters directly in your Python source code (e.g. print u'Россия' in Python 2), if you are confident all your systems handle Unicode files properly.

For information about reading Unicode data from a file, see this answer:

Character reading from file in Python

2 of 10
54

Print a unicode character in Python:

Print a unicode character directly from python interpreter:

el@apollo:~$ python
Python 2.7.3
>>> print u'\u2713'
✓

Unicode character u'\u2713' is a checkmark. The interpreter prints the checkmark on the screen.

Print a unicode character from a python script:

Put this in test.py:

#!/usr/bin/python
print("here is your checkmark: " + u'\u2713');

Run it like this:

el@apollo:~$ python test.py
here is your checkmark: ✓

If it doesn't show a checkmark for you, then the problem could be elsewhere, like the terminal settings or something you are doing with stream redirection.

Store unicode characters in a file:

Save this to file: foo.py:

#!/usr/bin/python -tt
# -*- coding: utf-8 -*-
import codecs
import sys 
UTF8Writer = codecs.getwriter('utf8')
sys.stdout = UTF8Writer(sys.stdout)
print(u'e with obfuscation: é')

Run it and pipe output to file:

python foo.py > tmp.txt

Open tmp.txt and look inside, you see this:

el@apollo:~$ cat tmp.txt 
e with obfuscation: é

Thus you have saved unicode e with a obfuscation mark on it to a file.

🌐
Linode
linode.com › docs › guides › how-to-use-unicode-in-python3
Using Unicode in Python 3 | Linode Docs
March 20, 2023 - Python 3 also permits many Unicode characters to be used as part of variable and function names. However, symbols or emojis can’t serve in these roles. For instance, the “heart” emoji can not be part of a variable name. In the following example, the variable name Øyen contains a character from the Norwegian alphabet...
🌐
GitHub
gist.github.com › arrowtype › 713dad14fe9a574d58d1aab61ba9b2f0
The basics of working with unicode values in Python · GitHub
Unicodes can either be integers (“A” is 65, “B” is 66, etc) or hex (“A” is 0x41, “B” is 0x42, etc). When scripting with RoboFont or FontTools, a hard thing at first is that different styles come up in different contexts.
🌐
Python Cheat Sheet
pythonsheets.com › notes › basic › python-unicode.html
Unicode — Python Cheat Sheet
Therefore, Unicode was developed to solve this issue. It defines the code point to represent various characters like ASCII but the number of characters is up to 1,111,998. In Python 2, strings are represented in bytes, not Unicode.
🌐
Tutorialspoint
tutorialspoint.com › python › python_unicode_system.htm
Python - Unicode System
The rules for translating a Unicode ... UTF-16 and UTF-32. UTF stands for Unicode Transformation Format. Python 3.0 onwards has built-in support for Unicode....
🌐
Stanford CS
cs.stanford.edu › people › nick › py › python-string.html
Python Strings
In the early days of computers, the simple ASCII character encoding was very common, encoding the roman a-z alphabet. ASCII is simple, requiring just 1 byte to store 1 character, but it cannot handle characters of other languages. Each character in a Python string is a unicode character, so ...
🌐
YouTube
youtube.com › watch
Python and Unicode characters - YouTube
What is Unicode? How can we insert Unicode characters into strings? What's the difference between \x, \u, and \U? How can we insert characters with their nam...
Published: March 23, 2022