iterating over list with one mising value

Sammy Danso samdansobe at yahoo.com
Tue Feb 7 07:27:25 EST 2012


Hello experts,
I am having trouble accessing the content of my list. 
my list content has 2-pair value with the exception of one which has single value. here is an example  ['a', 1, 'b', 1, 'c', 3, 'd']
 
I am unable to iterate through list to access invidual value pairs
 
I get an error message saying ' the list should more than 1 value pairs'. I guess because 'd' has no value. How do I solve this problem?
 
Your help would be much appreciated.
 
Thanks
Sammy
___________________________________
http://www.comp.leeds.ac.uk/scsod/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120207/1537aefc/attachment.html>


More information about the Python-list mailing list