Flatten Nested List medium
lists

Write a function solution(nested) that flattens a list that may contain integers or other lists (one level of nesting only).

Example

solution([1, [2, 3], [4, 5], 6]) → [1, 2, 3, 4, 5, 6]
solution([[1], [2], [3]])         → [1, 2, 3]
solution.py
💡 Tip: Press Ctrl+Enter to run