I have a list like
l = []
How do I check if l[i] is empty?
l[i] = ''
and
l[i] = ""
dont't work.
Try:
if l[i]:
print 'Found element!'
else:
print 'Empty element.'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With