python How to check if array list is not empty

l = []

if l:
    print "list has items"

if not l:
    print "list is empty"

Source: python – How to check if array is not empty? – Stack Overflow