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


#1

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:
Natasha

Replace this line with your code.


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

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


#3

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