python version command linux code example
Example 1: terminal python version
# in python
$ python --version
# in python3
$ python3 --version
Example 2: get python version in code
import platform
print(platform.python_version())
Example 3: check python version kali linux
$ python2 --version
Example 4: python version command
import sys
print(sys.version)