How do you decode an unfamiliar comprehension in three steps — and what happens when the expression you build is itself a list?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
Work out on paper what this expression evaluates to, then write the answer down. Do not run it.
[len(e) for e in ['py', 12, 'stack', '3.14', 9.0] if type(e) == str]
Ask the three questions in order — what is iterated over, what is the condition, what is the expression — and look closely at which elements sit inside quotes.
Assign the resulting list to traced_lengths as a plain list literal.