the singleton pattern there can be only one!--connor macleod the problem one of the first debugging techniques you learn is simply printing the values of certain variables to the console this helps you see what is going on inside your program when the programs you write become more complexyou reach point where you cannot run the whole program in your mind effectively this is when you need to print out the values of certain variables at specific timesespecially when the program does not act as you expect it to looking at the output of your program at different points in its execution helps you locate and fix bugs swiftly your code quickly becomes littered with print statementsand that' fineuntil one fine day when you deploy your code running your code on serveras scheduled job on your own machineor as standalone piece of software on client' computer means that you can no longer rely on the console for feedback when something goes wrong you have no way of knowing what went wrong or how to replicate the issue this takes debugging from the realm of science straight into gambling the simplest solution is to replace print statements with command to write the output to file instead of to the consolelike thiswith open("filename log"" "as log_filelog_file write("log message goes here \ "(cwessel badenhorst badenhorstpractical python design patterns