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
What does * args mean in python?
How to find the index of an element in a list python?
How to remove items from a list while iterating?
What is python and explain some of its benefits?
What is the output of print str[4: ] if str = ‘ python language’?
What is pytables?
What is pip and when it is used ?
How to minimize the memcached server outages in your python development?
What does the ord() function do in python?
How to run script in python?
Write a program to draw a board ex: 3by3 or 4by4 etc?
Use of double quotes and single quote in python?
What is the syntax for exponentiation and give example?
Is python good for web development?
What do you understand by membership operators in python?