Stop Using "print()" for Debugging: A 5 Minute Quickstart Guide to Python’s logging Module
Fri 06 April 2012 Al Sweigart
To figure out bugs in your code, you might put in print
statements/print()
calls to display the value of variables. Don’t do this. Use the Python logging
module.