The goal of this assignment is an algorithm that can flatten an arbitrarily nested list.
Requirements:
- Items should be in the original order of appearance
- Null items should be included
- Empty outer list returns empty list
- Empty sublist's should be ignored
Add your function to test.py
and name it flatten
. The function should take the original
list a parameter and return a flattened version. Run the unittest to verify your algorithm meets all requirements.