Check Python Version in Your Script — A Helpful Illustrated Guide
To check your version in your Python script—for example, to make sure that a user of your Python app uses the correct version—you can use the following commands. To achieve this, simply import the sys module and print the sys.version attribute to your Python shell: Try them in our interactive browser-based Python shell: Exercise: execute … Read more