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

What is self and init in python?

0 Answers  


What is a pil in python?

0 Answers  


Why python is a dynamic language?

0 Answers  


Which is better list or dictionary in python?

0 Answers  


What are the two types of functions in python?

0 Answers  


What language is python based on?

0 Answers  


Do you always need a default constructor?

0 Answers  


What is the syntax for exponentiation and give example?

0 Answers  


What data types does python support?

0 Answers  


What do you understand by membership operators in python?

0 Answers  


Why is python called python?

0 Answers  


How to check the string consists of alphanumeric characters ?

0 Answers  


Categories