dimanche 26 septembre 2021

Why is my function running but not giving any output?

def func(*args,**kwargs):
    if 'fruit' in args and 'food' in kwargs:
        print('I would like to eat {} {}'.format(args['fruit'], kwargs['food']))

func(fruit='apple',fruit1='banana',food='biryani',dinner='meat')

Aucun commentaire:

Enregistrer un commentaire