How is the function returning the name?

Asked

Viewed 45 times

0

As the function fala_oi is managing to return the nome?

def mestre(funcao, *args, **kwargs):
    return funcao(*args, **kwargs)


def fala_oi(nome):
    return f'Oi {nome}'


executando = mestre(fala_oi, 'Felipe')
print(executando)

Upshot:

 Oi Felipe
  • I closed it as duplicate because it seems to me that your difficulty is understanding the args and kwargs (since the functioning of the rest - passing one function to another, etc - has already been explained in your previous questions)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.