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 does append () do in python?

0 Answers  


What are supporting python packages for data science operations?

0 Answers  


What is gui in python?

0 Answers  


What does the ‘yield’ keyword do?

0 Answers  


What is n in python?

0 Answers  


Which operator helps to do addition operations ?

0 Answers  


Tell me how does the ternary operator work in python?

0 Answers  


What are the immutable build-in data types of python?

0 Answers  


Explain different ways to create an empty numpy array in python?

0 Answers  


Explain me what is the purpose of doc strings in python?

0 Answers  


What is the result of pow(x,y)?

0 Answers  


What do you think is the output of the following code fragment?

0 Answers  


Categories