Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

“In Python, functions are first-class objects.” What do you infer from this?

Answer Posted / glibwaresoftsolutions

"In Python, functions are first-class objects" indicates that functions are handled just like any other object in Python. You could:

Give variables functions.
For instance, f = my_function


Give functions to other functions as arguments.
Some_function(my_function) is an example.

Functions that return from other functions
For instance, return my_function

Use data structures to store functions.
Functions_list = [func1, func2] is an example.

Because of this flexibility, functions can be employed in more potent and dynamic ways, including callbacks and higher-order functions.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to call a function of a module by using its name (a string)?

906


How do I run python on windows?

956


explain the reduce() function?

872


How do I get numpy in python?

899


What is special about python?

815


Differentiate between split(), sub(), and subn() methods of the re module?

962


How many keywords are there in python?

910


What is python orm?

940


Does python support inheritance?

870


Does python have multiple inheritance?

838


How do I define raw_input in python?

961


Explain try keyword?

957


What is pip software in the python world?

896


Define the usage of split?

1034


What will be the output of data[-2] from the list data = [1,5,8,6,9,3,4]?

798