Programming in C I used to have code sections only used for debugging purposes (logging commands and the like). Those statements could be completely disabled fo
C
If you're working on Spyder, you probably only need this:
try: print(x) except: #code to run under ifndef x = "x is defined now!" #other code
The first time, you run your script, you'll run the code under #code to run under ifndef, the second, you'll skip it. Hope it works:)
#code to run under ifndef