I am Hack Sparrow
Captain of the Internets.

Get Python version of your System

How do you get the version information of your Python installation?

Getting the version number of your Python installation is not as straightforward as you might have guessed. But once you get the pythonic way of doing things, the implementation starts to make sense. The way to know the Python version is thus:

import sys


  1. What would happen if you just do sys.version instead of sys.version[:5]?
  2. What is the pythonic way?
  3. Type import this at the Python console.
  4. Is there any other way to know the Python version?

Useful Links
  1. Download Python
  2. Python Tutorial

Make a Comment