»
S
I
D
E
B
A
R
«
Checking if a list is empty in Python
November 28th, 2009 by admin

Here is the best way to check if a list is empty in Python:

a = []
if not a:
  print "List is empty"
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay



Similar Posts:
Leave a Reply

Powered by WP Hashcash