1from typing import List 2 3 4def unroll(list_to_unroll: List) -> List: 5 ret = [] 6 for x in list_to_unroll: 7 if not isinstance(x, list): 8 ret += [x] 9 else: 10 ret += unroll(x) 11 return ret
5def unroll(list_to_unroll: List) -> List: 6 ret = [] 7 for x in list_to_unroll: 8 if not isinstance(x, list): 9 ret += [x] 10 else: 11 ret += unroll(x) 12 return ret