# List comprehension assesment
-
What is a `list comprehension` in Python?
A) An understanding of a list.
B) A compact notation for generating lists.
C) A function that parses and acts on a list as a whole.
D) A list of things that Python understands. -
Can you use a list comprehension as a list filtering mechanism? I.e. if you
had a list of first names, could you use a list comprehension to make a list
of only the first names starting with an A in that list?
A) Yes
B) No
C) Maybe -
A list comprehension produces
A) An integer
B) A boolean
C) A comprehension
D) A list -
What is the primary use case for a list comprehension instead of the more
niave approaches available to a programmer?
A) Readability
B) Algorithm complexity
C) Reduced memory footprint