gpt4 book ai didi

python - f()+f() 给出 [3,3,3,3] 为什么不给出 [3,3,3]

转载 作者:太空宇宙 更新时间:2023-11-04 00:19:27 24 4
gpt4 key购买 nike

<分区>

def f(x=[ ]):
x +=[3]
return x

print(f()+f())
print(f())

输出:

首先:

[3,3,3,3]

第二:

[3,3,3]

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com