Skip to content

Instantly share code, notes, and snippets.

@asmjahid
Last active September 3, 2017 18:31
Show Gist options
  • Save asmjahid/cc09671ec5ffe90b733bc1f2eab5359e to your computer and use it in GitHub Desktop.
Save asmjahid/cc09671ec5ffe90b733bc1f2eab5359e to your computer and use it in GitHub Desktop.
my_list = [ 1, 6, 7, 8, None, None, 9, 10, 2, 3, 4, 5, None, 11, 0 , 18, 0, 15]
new_list = list(filter(None, my_list))
print (new_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment