Apr-06-2022, 06:39 AM
Assign the parts that use the different indices to different variables. Those assignments will be on separate lines then and the error will point you to the line that's failing.
Then, work backwards from there - either print out your variables at different points to see whether they have the values you expect, or use a debugger like
I don't know what your situation is, but perhaps learning some of the basics in a more structured way (rather than while trying to fix this broken program) would serve you well?
Then, work backwards from there - either print out your variables at different points to see whether they have the values you expect, or use a debugger like
pdb
in the standard library.I don't know what your situation is, but perhaps learning some of the basics in a more structured way (rather than while trying to fix this broken program) would serve you well?