How to implement the –verbose or -v option into a script?
My suggestion is to use a function. But rather than putting the if in the function, which you might be tempted to do, do it like this: (Yes, you can define a function in an if statement, and it’ll only get defined if the condition is true!) If you’re using Python 3, where print is already a function (or if you’re … Read more