sys.version
version
A string containing the version number of the Python interpreter plus additional information on the build number and compiler used. It has a value of the form `’version (#buildnumber, builddate, build_time) [compiler]’`. The first three characters are used to identify the version in the installation directories (where appropriate on each platform). An example:
>>> import sys >>> sys.version '1.5.2 (#0 Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)]'