Stop Using print for Debugging: A 5 Minute Quickstart Guide to Pythons logging Module
inventwithpython.com/blog/2012/04/06/stop-using-print-for-debugging-a-5-minute-quickstart-guide-to-pythons-logging-module
From the page
Saved with the link. Notes from 2007 to 2016 are mostly the page's own words, so this is probably an excerpt.
This tutorial is short. To figure out bugs in your code, you might put in print statements/print() calls to display the value of variables. Dont do this. Use the Python logging module.