Coforge interview question

Convert nested lists to flattened list in python.