sys.version和sys.version_info 查看版本

简介:
>>> sys.version
'3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06) \n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]'
>>> sys.version_info
sys.version_info(major=3, minor=6, micro=2, releaselevel='final', serial=0)

>>> if sys.version_info > (3,6):
print('yes')
else:
print('no')

yes
目录
打赏
0
0
0
0
129
分享
相关文章
【Linux】INFO: attempting to log in with the new key(s), to filter out any that are already...
【Linux】INFO: attempting to log in with the new key(s), to filter out any that are already...
643 0
vs2019 This application failed to start because it could not find or load the QT platform plugin
这篇文章介绍了在VS2019中解决QT程序运行时出现的“无法找到或加载QT平台插件”错误的步骤,通过将必要的DLL文件和插件目录复制到项目解决方案中解决了问题。
|
9月前
|
JDK version和class file version对应关系
JDK version和class file version对应关系
解决OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0...
解决OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0...
1724 0
org.flywaydb.core.api.FlywayException: Schema “xxx” contains a failed migration to version 156!
org.flywaydb.core.api.FlywayException: Schema “xxx” contains a failed migration to version 156!
286 0
错误:has been compiled by a more recent version of the Java Runtime (class file version 56.0)
错误:has been compiled by a more recent version of the Java Runtime (class file version 56.0)
5082 0
AttributeError: ‘version_info‘ object has no attribute ‘version‘
AttributeError: ‘version_info‘ object has no attribute ‘version‘
275 0
The EF Core tools version '2.1.1-rtm-30846' is older than that of the runtime '2.1.3-rtm-32065'. ...
The EF Core tools version '2.1.1-rtm-30846' is older than that of the runtime '2.
2581 0