To print the version information, we use "sys.version_info", which can be used after importing the "sys" module, it returns a tuple containing some components of the version number: major, minor, micro, releaselevel, and serial.
要打印版本信息,我们使用“ sys.version_info ”,它可以在导入“ sys ”模块后使用,它返回一个元组,其中包含版本号的某些组件: major , minor , micro , releaselevel和serial 。
Note: "sys.version" is used to get the Python version only.
注意 :“ sys.version ”仅用于获取Python版本。
In the below code, we are implementing a Python program to print version information.
在下面的代码中,我们正在实现一个Python程序来打印版本信息