
The components can also be accessed by name, so sys.version_info is equivalent to sys.version_info.major and so on. The version_info value corresponding to the Python version 2.0 is (2, 0, 0, 'final', 0).

All values except releaselevel are integers the release level is 'alpha', 'beta', 'candidate', or 'final'. This string is displayed when the interactive interpreter is started.Ī tuple containing the five components of the version number: major, minor, micro, releaselevel, and serial.

Write a Python program to find out what version of Python you are using.Ī string containing the version number of the Python interpreter plus additional information on the build number and compiler used.
