platform.python_revision()

platform.python_revision()[source]

Returns a string identifying the Python implementation revision.

For CPython this is the Subversion revision from which the Python binary was built.

If not available, an empty string is returned.