Ad
  • Default User Avatar

    I tend to place a print() statement in my code for debugging. Errors sometimes prevent you from seeing the debugging print statements. If thats the case, place a return statement wherever you're trying to stop prior to the error, and have it return something that won't cause an error but instead just a wrong answer. It'll tell you your solution was wrong and show whatever you printed. I start with printing all the variables I care about right before the error, and then place the return statement after the printing but before the error line.

  • Default User Avatar

    Could someone reference me to the python resources I would need to learn to tackle this problem?