mercredi 10 octobre 2018

How to shorten the "is not None" in the if statement

In Python3, the Truth Value Testing in PEP8 says that for if A is None:, it can be converted to if A:. Like so, since the code below looks so messy and hard to grasp at once, can it be expressed more succinct in one way or another?

if A is not None and B is not None and C is not None:

Aucun commentaire:

Enregistrer un commentaire