Skip to content

Instantly share code, notes, and snippets.

@averjr
Last active February 7, 2018 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save averjr/1da7fe0e9ceb2f9cd0dc104925dadbbe to your computer and use it in GitHub Desktop.
Save averjr/1da7fe0e9ceb2f9cd0dc104925dadbbe to your computer and use it in GitHub Desktop.
Flat array
def flater(arr):
result = []
for el in arr:
if isinstance(el, list):
result = result + flater(el)
else:
result.append(el)
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment