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...


What is list comprehension? Give an example.



What is list comprehension? Give an example...

Answer / nashiinformaticssolutions

A syntax component called list comprehension makes it easier to create a list using an existing iterable.

For instance:


[i for i in range(1, 10)] = my_list

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

How does break work in python?

0 Answers  


Explain the difference between local and global namespaces?

0 Answers  


What is monkey patching?

0 Answers  


What does range () do in python?

0 Answers  


Do python classes need init?

0 Answers  


Can you slice a tuple?

0 Answers  


How to convert sting to number and viceversa in python?

0 Answers  


What is the dictionary in Python?

0 Answers  


Is python call by reference or value?

0 Answers  


Why do lambda forms not have statements?

0 Answers  


What does means by “call by reference” in python?

0 Answers  


Tell me is there a switch or case statement in python?

0 Answers  


Categories