Instead of blindly trying code until it works I would suggest you to write on paper the distinct steps that are required to solve the problem.
Imagine you are the computer and you can do nothing else but what Python allows you. How do you solve the problem ?
Usually people do this exercise on a small example. Then they generalise the approach when they find examples where it does not work.
Osnapitsjoey@lemmy.one 1 year ago
Ahhh you know what. This would help me. Because when I’m stumped, I’m definitely just “blindly” trying different orders of things and getting frustrated. Thank you very much for the tip
potterman28wxcv@beehaw.org 1 year ago
Yeah sometimes you just have to take a step back and think again. Then you will think more clearly and actually know what you wrote :) good luck!