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?
#2
You pass func_a to func_c without calling it. func_c prints, and then calls the function that was passed to it (z()). So that calls func_a, which prints. func_a returns None (the default return value) to func_c, which does nothing. func_c returns None to the print function on line 6, and it gets printed.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


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

Forum Jump:

User Panel Messages

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