samedi 3 octobre 2020

My goal is to make b constant so that the loop will continue adding b the the list throughout the loop

I want user input in b to constantly be in te loop

while True:
     a = ["apple", "banana", "cherry"]
     b = [input("enter fruits: ")]
     a.extend(b)
     print(a)



Aucun commentaire:

Enregistrer un commentaire