Hello,

I've worked my way through the Python course but I"m running into difficulty of knowing when to use Method 1 or Method 2 for iterating over a list inside a function. It seems that often both ways will work and method 1 appears simpler, but there are times that method 1 does not work and you have to iterate through indexes (described as method 2). Is there a rule to follow to know when and where to use each?

Here is my example code for the linked to lesson:

Method 2 is shown at the top in the function: double_list(x)

Method 1 is shown below in the function: double_list_2(x)

Both produce identical results and I'm struggling to figure out when one is desired or required over the other.

Thank you,

Darren