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 / nashiinformaticssolutions

"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

Explain python is one line?

817


What is python shell scripting?

821


Does python interact with database?

932


How to copy an object in python?

1019


How to determine type of an object?

875


How do you reverse a string in python?

881


Can you explain this why are we getting an error here?

935


Definition of %s in python?

880


Which package is the fastest form of python?

973


How can you create a copy of an object in python?

971


Do you know what is numpy and how is it better than a list in python?

943


What functions or methods will you use to delete a file in python?

878


What are accessors, mutators, @property?

858


explain the map() function?

904


How will you get all the keys from the dictionary?

855