Categories
Computer Science

How to check Python version (both command-line and programmatically)

Sometimes you might want to confirm if your program will run / is running under Python 2.x or 3.x. We have a very simple way to do the stuff.