Here is a portion of the code where I’m having issues:
This is the output when I run it while printing the ledger:
I’m not understanding how the items are IN the ledger but they are not printing out when I run it. It should print each one if it’s in the ledger?
Let me know if you need to see other parts of the code or if you need the replit link (I’m working on this with PyCharm, but I can copy it over and publish the link to add it here).
Appreciate any help!
From that bit of code, it appears the
return is in the
for loop. Which means you loop once and then return without going through all the items in
self.ledger. So you need to decrease the indent on the return statement so that the loop iterates over all the items in
Also, it’s much easier to debug with complete code than with snippets as something else may be happening too.
Thank you Jeremy, so much. You’re a genius.
And, obviously… I am not.
Ugh. I hate when I make dumb mistakes like that.
:::slams head on desk:::
Thank you , thank you!!
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.