- def ALLFLAGS():
- global GERMANY
- global Germany
- Germany = ImageTk.PhotoImage(Image.open("Flags/Germany.png"))
- GERMANY = Label(game, image=Germany)
- GERMANY.photo = Germany
- GERMANY.pack()
- global FRANCE
- global France
- France = ImageTk.PhotoImage(Image.open("Flags/France.png"))
- FRANCE = Label(game, image=France)
- FRANCE.photo = France
- FRANCE.pack()
- global allflags
- allflags = [GERMANY, FRANCE]
- ...
- ...
- random.choice(allflags)
ERROR: NameError: name 'allflags' is not defined
Aucun commentaire:
Enregistrer un commentaire