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 save an image when you know the url?

816


How do you implement json given that python is best suited for the server-side application?

928


How can you generate random numbers in python?

974


Explain relational operators in python?

977


What does join () do in python?

861


What is the best tutorial for python?

1053


What flask is and its benefits?

983


What are the rules for a local and global variable in python?

960


What is meant by attribute error in python?

995


Tell me what's the process to get the home directory using ‘~' in python?

931


Is geany good for python?

882


What is python's parameter passing mechanism?

989


How do you write a simple code in python?

882


Does xrange work python 3?

920


Where python is mostly used?

852