How do I check in python if an element of a list is empty?

The Solution to How do I check in python if an element of a list is empty? is


Try:

if l[i]:
    print 'Found element!'
else:
    print 'Empty element.'

~ Answered on 2011-12-07 07:43:26


Most Viewed Questions: