File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,7 +92,20 @@ NameError: name 'version' is not defined
9292
9393`from ···import ` 直接导入 version 属性
9494
95- 
95+ ```python
96+ # !/usr/bin/env python3
97+ # -*- coding: UTF-8 -*-
98+
99+ from sys import version
100+
101+ print (version) # 直接使用 version 属性,无需 sys. 前缀
102+ ```
103+
104+ 运行结果:
105+
106+ ```
107+ 3.6 .1 (v3.6.1:69c0db5 , Mar 21 2017 , 18 :41 :36 ) [MSC v.1900 64 bit (AMD64 )]
108+ ```
96109
97110
98111
Original file line number Diff line number Diff line change 1- * [ 使用Python虚拟环境 ] ( /Article/advanced/ 使用Python虚拟环境.md)
2- * [ Mac中使用virtualenv和virtualenvwrapper ] ( /Article/advanced/ Mac中使用virtualenv和virtualenvwrapper.md)
1+ * [ 使用 Python 虚拟环境 ] ( 使用Python虚拟环境.md )
2+ * [ Mac 中使用 virtualenv 和 virtualenvwrapper ] ( Mac中使用virtualenv和virtualenvwrapper.md )
Original file line number Diff line number Diff line change 6060 - 首页 : index.md
6161 - 为什么学 Python : PythonBasis/python0/WhyStudyPython.md
6262 - 代码规范 :
63+ - 序 : codeSpecification/codeSpecification_Preface.md
6364 - 简明概述 : codeSpecification/codeSpecification_first.md
6465 - 注释 : codeSpecification/codeSpecification_second.md
6566 - 命名规范 : codeSpecification/codeSpecification_third.md
131132 - 自定义容器 : PythonBasis/python10/5.md
132133 - 运算符魔术方法 : PythonBasis/python10/6.md
133134 - 枚举类 :
135+ - 序 : PythonBasis/python11/Preface.md
134136 - 使用 : PythonBasis/python11/1.md
135137 - Enum 源码 : PythonBasis/python11/2.md
136138 - 自定义类型 : PythonBasis/python11/3.md
You can’t perform that action at this time.
0 commit comments