0
How to write a code to print pattern using English Alphabets
for loop , while loop
4 Antworten
0
# import string Module and use ascii_lowercase or ascii_uppercase functions.
import string
print (list(string.ascii_uppercase))
print (list(string.ascii_lowercase))
print (string.ascii_uppercase)
print (string.ascii_lowercase)
Output for the above script:
['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']
['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']
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0
#Using for loop
import string
for str in string.ascii_uppercase:
print (str)
0
okkkkkkkk
0
thank you