A bit of a conceptual question:
Are the two methods of iterating over a list (copied below, from 12.16) completely identical?
The second method "feels" better to me, because I feel like I'm controlling exactly when in this loop the action code (here "print ... ") will act. I.e., I'm telling the code exactly which index to operate over. Or should I be confident that method 1 will absolutely always work sequentially through the list (suggesting no difference other than preference in syntax)?
I'm concerned for applications where the loop needs to act in an important sequence.
Any input/opinion from more experienced coders is much appreciated!
for item in list: print item for i in range(len(list)): print list[i]