Python Forum
Why is this the output I am getting?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why is this the output I am getting?
#1
def func_a():
    print('inside func_a')
def func_c(z):
    print('inside func_c')
    return z()
print(func_c(func_a))
the output I get is
inside func_c
inside func_a
None

I'm having a hard time understanding how putting a function as an input into another function gives me this output.
Reply


Messages In This Thread
Why is this the output I am getting? - by wlsa - Jul-04-2018, 08:55 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020