diff --git a/u3/flatten_array.py b/u3/flatten_array.py new file mode 100644 index 0000000..b0f7679 --- /dev/null +++ b/u3/flatten_array.py @@ -0,0 +1,8 @@ +def flatten(iterable): + result = [] + for item in iterable: + if isinstance(item, list): + result.extend(flatten(item)) + elif item is not NONE: + result.append(item) + return result \ No newline at end of file