摘要:
# 创建一个全局列表容器来存储联系人字典 persons = [] # 创建联系人 def create_person(): name = input('name: ') address = input('address: ') phone = input('phone: ') person = { 阅读全文
摘要:
位置参数实例 函数没有任何位置参数 def hello_world(): print('hello') print('world') hello_world() 程序运行输出如下: hello world 函数有 1 个位置参数 def hello_world(n): for i in range( 阅读全文