samedi 5 juin 2021

Best practices on python conditionals [closed]

When it comes to best practices on conditionals, which of the following examples is recommended?

def sum(arg1,arg2):
   if arg1>3:
     return
   else:
     return arg1+agr2

or

def sum(arg1,arg2):
   if arg1<3:
     return arg1+agr2
   else:
     return

Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire