python versions code example
Example 1: python version
python ––version
Example 2: python version command
import sys
print(sys.version)
Example 3: latest version of python
# For macs...
# Apparently you don't want to upgrade 2.* just install 3.*
% brew install python3
Example 4: all python versions
Version Latest micro version Release date
3.4 3.4.10 2014-03-16
3.5 3.5.10 2015-09-13
3.6 3.6.13 2016-12-23
3.7 3.7.10 2018-06-27