Skip to content

Instantly share code, notes, and snippets.

@bngsudheer
Created March 16, 2017 13:54
Show Gist options
  • Save bngsudheer/aa760d8eb8ecad7a95aa7b6b9c6e026e to your computer and use it in GitHub Desktop.
Save bngsudheer/aa760d8eb8ecad7a95aa7b6b9c6e026e to your computer and use it in GitHub Desktop.
def flatten(my_list):
for a in my_list:
if not a:
continue
for b in a:
yield b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment