+ 1
Functions as objects. This module explains that functions can be assissgned and re-assigned to variables and later called by the re-assigned names. In simpler terms, functions can be named and renamed and later be called by their new name. Just as we humans, we have more than 1 names but are still the same person. For example you are sourabh dhanuka, if I called you by any of these names one at a time you will still answer me. I will make a practical example. def mango(a, b) return a + b y = 3 z = 2 fruit = mango print (fruit(y, z)) This example, mango is re-assigned to fruit. Which means fruit can also be used to call the function. I hope this was helpful?
21st May 2019, 2:07 PM
Oluwatosin
Oluwatosin - avatar