What way is the best to check an empty list?

srinivasan srinivas sri_annauni at yahoo.co.in
Wed Mar 25 10:38:53 EDT 2009


For ex: to check list 'A' is empty or not..
if A == []:
if A.count == 0:
if len(A) == 0:
if not A:

Thanks,
Srini


      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/



More information about the Python-list mailing list