Lists + Functions. Can't see where I'm going wrong!


Continuing the discussion from A day at the supermarket. lists and functions:

I've altered my code many times, but still keep receiving errors. Any help would be appreciated :slight_smile:

Replace this line with your code.

Hi Guys mine is still not working even thogh the code seems to be same

a function ends the moment a return keyword is reached, which in your case happens in the first run of the loop. Put the return at the same indent level as the for loop, so the whole loop can finish running


Ah, silly error. Got it working now, thank you!