Accenture interview question

How to flatten a nested list