Timber guard (what variable)

Continuing the discussion from Pythonic python – looping over lists:

(this is my code)
what variable should i use then???
kind regards,
J Hall

How on earth do people still manage to use block quotes? sigh. Place your code between triple backticks (`), in order for it to format properly.

What do you mean, what variable should you use? You’re looking for coins, right? And coins are items, yes? Therefore, what variable do you use in gold = self.findNearest( x ), where x is the variable?

Hint: Read only if you're stuck

You’ve already defined the variable in question.


What is the problem?

In the middle of the screen are the methods. Click on the one next to your boots called, move(targetPos) and the example will show you exactly what is wrong with line 21. Just be aware that the example shows the usage as an argument, so the parenthesis are not going to work in your code.