Ben Chuanlong Du's Blog

It is never too late to learn.

Get the Version of Python

In Shell

In [2]:
!python3 --version
Python 3.7.3

In Python

In [4]:
import sys

sys.version_info
Out[4]:
sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)
In [5]:
import platform

platform.python_version()
Out[5]:
'3.7.3'
In [ ]:
 

Comments