Testing for an empty list

Matthew Fitzgibbons elessar at nienna.org
Thu Jul 3 17:05:53 EDT 2008


Alexnb wrote:
> Okay this is a simple question I just don't know how. If I have a list, say:
> 
> funList = []
> 
> and after a while something possible should have been appended to it, but
> wasn't. How can I test if that list is empty.

if not funList:
	do_something()

-Matt



More information about the Python-list mailing list