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 * args mean in python?

911


How to find the index of an element in a list python?

852


How to remove items from a list while iterating?

752


What is python and explain some of its benefits?

818


What is the output of print str[4: ] if str = ‘ python language’?

872


What is pytables?

855


What is pip and when it is used ?

898


How to minimize the memcached server outages in your python development?

984


What does the ord() function do in python?

995


How to run script in python?

959


Write a program to draw a board ex: 3by3 or 4by4 etc?

799


Use of double quotes and single quote in python?

836


What is the syntax for exponentiation and give example?

836


Is python good for web development?

863


What do you understand by membership operators in python?

854