def test_flatten3(): assert [1, 2, 2, 3, 4, 1, 2] == flatten([[1, 2, [2, 3, 4]], 1, 2])
def test_flatten(): assert flatten([1, [2]]) == [1, 2] assert flatten([[2, 3], 1, [4]]) == [2, 3, 1, 4] assert flatten([[2], [3, [4, [5]]]]) == [2, 3, 4, 5]
def test_flatten(): assert ['a', 1, 2] == flatten(['a', 1, 2])
def test_flatten2(): assert [1, 2, 1, 2] == flatten([[1, 2], 1, 2])
def test_flatten2(): input = [["Hallo"]] assert flatten(input) == ["Hallo"]
def test_flatten3(): assert flatten([["Hallo"], ["Welt"]]) == ["Hallo", "Welt"]
def test_flatten1(): input = [] assert flatten(input) == []
def test_flatten_already_flat(): assert flatten([1,2,3,4,5,6]) == [1,2,3,4,5,6]
def test_flatten(): assert flatten([[1, 'a'], [4,[567,['frt', 'g']]], 7]) == [1, 'a', 4, 567, 'frt', 'g', 7]
def test_flatten_recursiv(): assert flatten([1, 2, 3, [1, 2, 3], [4, 5, [6, 7, [8, 9]]]]) == [1, 2, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9]
def test_flatten(): assert flatten([[1, 2, 3], [4, 5]]) == [1, 2, 3, 4, 5]