fix:数据打包

上级 606c0ff5
......@@ -2,12 +2,20 @@
演示函数的定义语法
"""
# 定义一个函数,输出相关信息
def say_hi():
print("Hi 我是黑马程序员,学Python来黑马")
# 调用函数,让定义的函数开始工作
say_hi()
# 定义加法函数
def add(x, y):
return x + y
result = add(1, 2)
print(result) # 输出3
a = 10
b = "hello"
c = [1, 2, 3]
d = (a, b, c)
print(d) # (10, 'hello', [1, 2, 3])
\ No newline at end of file
d = (10, 'hello', [1, 2, 3])
a, b, c = d
print(a) # 10
print(b) # hello
print(c) # [1, 2, 3]
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册