I am running an empty list through the following function, the list being gp. The idea was to append a letter to the end of the list, then reset it once it reached a length of 9. However, it just stops appending new letters once gp reaches 9 characters. def upd(gp): gp.append(random.choice(string.letters)) if len(gp) > 9: gp = []
Aucun commentaire:
Enregistrer un commentaire