Skip to content

Instantly share code, notes, and snippets.

@xodhx4
Created April 22, 2018 05:18
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 xodhx4/9897180375fe194d4402ce2aa4ff4b35 to your computer and use it in GitHub Desktop.
Save xodhx4/9897180375fe194d4402ce2aa4ff4b35 to your computer and use it in GitHub Desktop.
how to test list is empty
a = list()
# test list is empty
if not a:
print('list is empty')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment