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 does python handle memory management?

1657


How to find whether string is alphanumeric or not?

853


What is __ file __ in python?

827


What is a dictionary in python programming?

887


What is flask in python?

897


What is the difference between range & xrange? Explain?

861


Explain me what is flask-wtf and what are their features?

880


What is *kwargs and **kwargs?

914


Does python support database programming?

846


How do you calculate the length of a string?

885


What is a lambda function?

1624


What is os module?

848


Why is that none of my threads are not running? How can I make it work?

844


Are methods objects in python?

873


What is python literal?

972