What is LIST comprehensions features of Python used for?



What is LIST comprehensions features of Python used for?..

Answer / chaitanya

LIST comprehensions features were introduced in Python version 2.0, it creates a new list based on existing list.

It maps a list into another list by applying a function to each of the elements of the existing list.

List comprehensions creates lists without using map() , filter() or lambda form.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Python Interview Questions

What is the output of this following statement?

0 Answers  


Can a set be sorted python?

0 Answers  


Is ruby better than python?

0 Answers  


How to use the slicing operator in Python?

3 Answers  


Explain about membership operator in python?

0 Answers  


Why do we use uuid?

0 Answers  


Explain accessor and mutator methods in python?

0 Answers  


Is python faster than python2?

0 Answers  


How will you use python to read a random line from a file?

0 Answers  


What is a lambda in math?

0 Answers  


What are disadvantages of python?

0 Answers  


Does Python support Multithreading?

0 Answers  


Categories