Johnson Controls interview question

How to flatten a nested list ??