get version python terminal code example
Example 1: terminal python version
# in python
$ python --version
# in python3
$ python3 --version
Example 2: python show current version
import sys
print("Python version")
print (sys.version)
print("Version info.")
print (sys.version_info)