You going to enumerate that?

Following my last post on OrderedDict in Python, I came across another useful technique for working with data in Python, the enumerate function. In C++, using an index to reference data is second nature, but in Python with list comprehensions. For example: mylist = [‘foo’,’bar’,’boo’] for i in mylist: print i >>>foo bar boo This returns the […]