dimanche 22 août 2021

HOW CAN I PRINT ALPHABETICAL PATTERN IN PYTHON? [closed]

import string
from string import *
alp=list(string.ascii_uppercase)

for i in alp:
    print(i,end=' ')
print()

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

Desired output:

A P Q R \n
A B Q R\n
A B C R\n
A B C D

Aucun commentaire:

Enregistrer un commentaire