print russian and english alphabet using code lowcase symbols in python in python

In Python, you can print both the Russian and English alphabets using their lowercase symbols. Here's an example:

main.py
# Printing the Russian alphabet
for i in range(1072, 1104):
    print(chr(i), end=' ')
print()

# Printing the English alphabet
for i in range(97, 123):
    print(chr(i), end=' ')
print()
188 chars
10 lines

This code uses the chr() function to convert the Unicode code point to a character and then prints the characters using a loop. The range of unicode code points for the Russian alphabet is from 1072 to 1103, and for the English alphabet is from 97 to 122.

Note that the print statement uses the end parameter with a space character ' ' to separate the characters with a space instead of a newline.

Output:

main.py
а б в г д е ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я 
a b c d e f g h i j k l m n o p q r s t u v w x y z 
118 chars
3 lines

You can modify the code if you want to print uppercase characters or specific subsets of the alphabets.

related categories

gistlibby LogSnag