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))