First of all, as Steve Holden mentioned, do look at xlrd. It's awesome. Second, for your (a) question, if you want an iterator, that's quite easy:
matriz = iter(matriz) matriz.next() # Discard the first one for i in matriz: This technique works really well, especially if you have sub-loops. Then, if you use a defaultdict which uses a list for a constructor for i in matriz: if i[a] and i[b]: g[i[a]].append(i[b]) HTH, Pat -- http://mail.python.org/mailman/listinfo/python-list