I have two conditions C1 and C2. I want my program to perform something different in case that C1 and C2 are true, C1 is true but not C2, C2 is true but not C1, neither C1 nor C2 is true.
Now I have this code:
if C1 and C2:
...
elif C1:
...
elif C2:
...
else:
...
Is there a more efficient way to code this in Python?
Aucun commentaire:
Enregistrer un commentaire