Bonsoir,
j'aurais besoin de savoir pourquoi lorsque j'exécute ceci, si j'écris Raymond ou B, le script se termine comme prévu mais si j'écris Simon ou A, le while recommence à l'infini alors test est bel et bien égal a Simon.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 test=input() if test in ["Simon","A"]: test="Simon" if test in ["Raymond","B"]: test="Raimond" while test not in ["Simon","Raymond"]: print("Les personnages disponibles sont : " + str(personnages)) test = input() if test in ["Simon", "A"]: test = "Simon" if test in ["Raymond", "B"]: test = "Raymond"
Partager