mercredi 15 juillet 2020

Python - How to change order of instructions depending on a condition

I would have a question on Python code. Is there a way to do the following :

if conditon:
    A(**paramsA)
    B(**paramsB)
else:
    B(**paramsB)
    A(**paramsA)

Without repeating A() and B() to make it cleaner ?

Thanks !

Aucun commentaire:

Enregistrer un commentaire