python3 get version cmd code example
Example 1: terminal python version
# in python
$ python --version
# in python3
$ python3 --version
Example 2: python version command
import sys
print(sys.version)
# in python
$ python --version
# in python3
$ python3 --version
import sys
print(sys.version)