What way is the best to check an empty list?

Tim Chase python.list at tim.thechases.com
Wed Mar 25 10:52:18 EDT 2009


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

"if not A"

-tkc






More information about the Python-list mailing list