Skip to content

Commit f8b0347

Browse files
authored
Update Python 08 定义函数(1) 参数, 属性, 使用.txt 更改函数参数综合示例
1 parent 45b36f5 commit f8b0347

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

01 Python 基础/Python 08 定义函数(1) 参数, 属性, 使用.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def example():
222222
函数参数自左至右的顺序为:
223223
位置形参, 星号元组形参, 命名关键字形参, 双星号字典形参
224224
综合示例:
225-
def example(a, b, *args, c, **kwargs):
225+
def example(a, b, /, *args, c, **kwargs):
226226
print(a, b); print(args); print(c); print(kwargs)
227227

228228
example(1, 2, 3, 4, ("hello", "python"), c="666", **{"必须": "前面加", "**": "以拆分"})

0 commit comments

Comments
 (0)