- To print alphabets from A to Z
Output:
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
print("Alphabets from A to Z :")
c=65
for i in range(0,26):
print(chr(c),end=" ")
c+=1
Alphabets from A to Z : 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 ZProgram
Here, we just used 'for loop' for 26 alphabet characters
c = 65 #Set the 1st character
for i in range(0,26):
print(chr(c),end=" ")
c+=1
You can print the same in small alphabets, just set c=97