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 this mean: *args, **kwargs?
Is python better than ruby?
What do you mean by *args and **kwargs?
What are variables in python?
Does Python support enums?
What does %s mean in python?
What is singleton class in python?
What is whitespace in python?
Does amazon use python?
What is a generator in python?
What are magic methods in python?
What is long in python?
How is print statement represented in python 3 (v/s python2)?
Explain what is namespace in python?
What are the disadvantages of python?