Python One-Liner to Flatten a Nested List
Description
Flatten a deeply nested list using a Python one-liner with list comprehension
Code Snippet
nested = [[1, 2], [3, 4], [5]]
flat = [item for sublist in nested for item in sublist]
print(flat) # [1, 2, 3, 4, 5]