Question d’entretien chez John Deere

Python script to print the following pattern in most optimal way i.e. in one for loop: * ** *** ****

Réponses aux questions d'entretien

Utilisateur anonyme

12 mai 2019

for i in n: print("*"*i)

Utilisateur anonyme

12 mai 2019

print(" ".join([("*"*i) for i in range(10)]))