0

How to write a code to print pattern using English Alphabets

for loop , while loop

25th Oct 2018, 2:45 PM
Abhinaya
Abhinaya - avatar
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
30th Oct 2018, 5:10 AM
Ranjit Yalamanchili
Ranjit Yalamanchili - avatar
0
#Using for loop import string for str in string.ascii_uppercase: print (str)
30th Oct 2018, 5:17 AM
Ranjit Yalamanchili
Ranjit Yalamanchili - avatar
0
okkkkkkkk
30th Oct 2018, 7:08 AM
Abhinaya
Abhinaya - avatar
0
thank you
30th Oct 2018, 7:08 AM
Abhinaya
Abhinaya - avatar