vendredi 18 décembre 2020

Condition as expression in Python [duplicate]

Is there a way to program this line without if?

if a > 0 : a-=1

I am looking for an expression instead an if, because I believe that code readability is improved if there are no conditions.

Aucun commentaire:

Enregistrer un commentaire