import sys sys.version_info
sys.version_info(major=3, minor=7, micro=0, releaselevel='final', serial=0)
# 判断当前的python版本是否是python3
sys.version_info>=(3,0)
import sys sys.version_info
sys.version_info(major=3, minor=7, micro=0, releaselevel='final', serial=0)
# 判断当前的python版本是否是python3
sys.version_info>=(3,0)