I'm currently reading some online Python stuff and something interesting popped up. Basically it says not to do this:
for i in range(len(mylist)):
print i, mylist[i]
Instead it says that it is better to do this:
for (i, item) in enumerate(mylist):
print i, item
Normally I would go with the first option, but I don't see any potential risks involved in doing this. Why is the first code bad? Could the first body of code have some kind of effect on proceeding lines of code compared to the latter?