Flattening Lists
Mon 10 August 2026
nested = [[1, 2], [3, 4], [5]]
flat = [item for sublist in nested for item in sublist]
Score: 10
Category: chapter9_list_comprehension
nested = [[1, 2], [3, 4], [5]]
flat = [item for sublist in nested for item in sublist]
Score: 10
Category: chapter9_list_comprehension