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.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What does this mean: *args, **kwargs?

903


Is python better than ruby?

826


What do you mean by *args and **kwargs?

920


What are variables in python?

882


Does Python support enums?

977


What does %s mean in python?

1000


What is singleton class in python?

875


What is whitespace in python?

1154


Does amazon use python?

823


What is a generator in python?

1286


What are magic methods in python?

1012


What is long in python?

900


How is print statement represented in python 3 (v/s python2)?

1012


Explain what is namespace in python?

978


What are the disadvantages of python?

1044