Alexnb:
> How can I test if the list item is empty without getting that exception?

In Python such list cell isn't empty, it's absent. So you can use
len(somelist) to see how much long the list is before accessing its
items. Often you can iterate on the list with a for, so you don't need
to care of the len().

Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to