python - platform.python_version_tuple() 的返回值是什么意思

标签 python platform

有人可以解释一下 platform.python_version_tuple() 的返回值吗?什么是主要、次要和补丁级别?使用这些有什么意义?

最佳答案

一如既往,阅读 documentation有帮助。

您甚至可以直接在 IDLE 中执行此操作:

>>> import platform
>>> help(platform.python_version_tuple)
Help on function python_version_tuple in module platform:

python_version_tuple()
    Returns the Python version as tuple (major, minor, patchlevel)
    of strings.

    Note that unlike the Python sys.version, the returned value
    will always include the patchlevel (it defaults to 0).

>>> platform.python_version_tuple()
('3', '6', '1')

有关软件版本控制的一般信息,wikipedia (几乎总是)一个好的起点。

关于python - platform.python_version_tuple() 的返回值是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44199611/

相关文章:

python - 从 RaspberryPi 传感器向 Django 后端发送数据(频率、批量更新、鲁棒性)

路由器后面的 Python 客户端/服务器

c# - 原生 C++ 还是 .NET for Business App?

android - Surfaceflinger 测试程序

python - 如何打印带有索引的列表中的元素?

python - 将 pandas 数据框中的行相乘

python - 遍历列表删除项目,一些项目没有被删除

android - Android系统服务从哪里启动?

android - 为什么 Android API 级别 9 已过时?

netbeans - 在 NetBeans 中添加 Java ME 平台