a. Tuple comprehension offers a fast and compact way to generate a tuple.
Answer
True
b. List comprehension and dictionary comprehension can be nested.
Answer
True
c. A list being used in a list comprehension cannot be modified when it is
being iterated.
Answer
True
d. Sets being immutable cannot be used in comprehension.
Answer
False
e. Comprehensions can be used to create a list, set or a dictionary.
Answer
True
0 Comments:
Post a Comment