feat(python进阶): 新增模块与包课程
This commit is contained in:
9
02_python进阶/2_1_模块与包/agent_package/status_text.py
Normal file
9
02_python进阶/2_1_模块与包/agent_package/status_text.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# 第 2-1 课示例:包中的模块
|
||||
|
||||
|
||||
def get_status_text(enabled):
|
||||
"""把布尔值状态转换成中文文本。"""
|
||||
if enabled:
|
||||
return "启用"
|
||||
|
||||
return "停用"
|
||||
Reference in New Issue
Block a user