Pour obtenir le contraire d'un booléen en python, on peut utiliser l'opérateur logique not:
>>> cond = True>>> type(cond)<class 'bool'>>>> condTrue>>> cond = not cond>>> condFalse
Références
| Liens | Site |
|---|---|
| not | programiz.com |
| How do I get the opposite (negation) of a Boolean in Python? | stackoverflow |
