jeudi 17 octobre 2019

How to write if statement with *args?

if anyone can guide me how to write the below statement, I want to check if x value is greater than 10 then only it's print it out

def __num__(*args):
    if x > 10 in args:
        print('I am testing args using {}'.format(__num__[x]))
    else :
        print('Something Goes Wrong')   

__num__(x = 22)

Aucun commentaire:

Enregistrer un commentaire