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 are the python types?
Explain about classes in strings?
What are the best sites to learn python?
Explain about pickling and unpickling?
What does kwargs mean?
How do you sort a list in descending in python?
What are tuples in python? How differ with lists?
How to run script in python?
What is the difference between append() and extend() method in python?
How to write multiple statements in a single line in python?
Can you sort a set in python?
How lists is differentiated from tuples?
Explain how can you access a module written in python from c?
What are the types of basic functions in python?
What are variables in python?