How to Collapse Lists Inside a List in Python

Prompt

Result