python print version number code example
Example 1: python print version
import sys
print(sys.version)
Example 2: get python version in code
import platform
print(platform.python_version())
import sys
print(sys.version)
import platform
print(platform.python_version())