IT & IoT Security | Cloud | It's all about the life itself

Nothing in life is as important as you think it is, while you are thinking about it.

Python – ord() and chr() functions

Hi, these functions, for example , convert a letter into its corresponding ascii code and vice versa.

ord(A) –> give the value of 65

chr(65) –> would give “A”

Here is a sample code for printing the alphabet 🙂

start_character = "A"
end_character = "Z"
for i in range(ord(start_character),ord(end_character)+1):
    print(chr(i))