> python --version Python 2.7.16 > python3 --version Python 3.9.7
import sys print(sys.version) print(sys.version_info) # 输出结果 3.9.7 (default, Oct 13 2021, 06:45:31) [Clang 13.0.0 (clang-1300.0.29.3)] sys.version_info(major=3, minor=9, micro=7, releaselevel='final', serial=0)