Existe-t-il un raccourci pour écrire une comparaison dans une instruction if si vous faites la même comparaison pour plusieurs valeurs. Juste curieux si quelque chose comme ceci est possible. Merci pour l'aide!raccourci pour et/ou en python if instructions
a =1
b =1
c =1
if a == 1 and b ==1 and c == 1:
print('yes')
# It would be nice if you could do this or something like it.
if a,b,c == 1:
print('this would be easier')
Est-ce que c'est bien '(a, b, c) == (1,1,2)' ?? – Rafael