In Python I like to use the debug flag you set the flag to true at runtime. You do not then need to clean up your code and comment out the printlns
For example
if __debug__: print variablename
__debug__
This constant is true if Python was not started with an -O
option. See also the assert
statement.