print russian and english alphabet using code symbols in python

To print the Russian and English alphabets using code symbols in Python, you can utilize Unicode characters. Here's an example code snippet that accomplishes this:

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

# Printing English alphabet
for i in range(65, 91):
    print(chr(i), end=' ')
176 chars
10 lines

This code makes use of the range function to iterate over the Unicode code points corresponding to the desired alphabets. The chr() function is then used to convert the code points into the corresponding Unicode characters, which are then printed to the console.

The output of the above code will display the Russian alphabet followed by the English alphabet, each separated by a space.

Note: Ensure that your console supports the display of Unicode characters, as some outdated terminals or IDEs may not render all Unicode characters correctly.

Tags: python, unicode

related categories

gistlibby LogSnag