So in the lecture notes it says below:
Method 1 - for item in list:
for item in list:
Method 2 - iterate through indexes:
for i in range(len(list)):
Method 1 is useful to loop through the list, but it's not possible to modify the list this way. Method 2 uses indexes to loop through the list, making it possible to also modify the list if needed. Since we aren't modifying the list, feel free to use either one on this lesson!
For some reason I think both can be used to modify the list if needed. Can someone explain to me why method 1 doesn't have list modifying abilities? I can just do a for each item in n, n=n+1 or something. Thoughts?
Thanks in advance!