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 |
What is meant by instantiating a class?
What is the parameter passing mechanism in Python?
What is numpy shape?
How is python better than c?
Write a program to show the singleton pattern used in python.
When do you choose a list over a tuple?
Explain python’s pass by references vs pass by value. (Or) explain about python’s parameter passing mechanism?
Do you know what are the optional statements that can be used inside a <try-except> block in python?
What is a pass in python?
What is string slicing in python?
Explain when is the python decorator used?
What is the comment tag in Python ?