num + = num 不等于num = num + num
例如:
a = [100] def sum(num): # num += num num = num + num # 不等于num += num print(num) sum(a) print(a)
输出结果:[100,100]
[100]
a = [100] def sum(num): num += num print(num) sum(a) print(a)
输出结果:[100,100]
[100,100]
标签:nbsp pos style 等于 gpo def python bsp blog
num + = num 不等于num = num + num
例如:
a = [100] def sum(num): # num += num num = num + num # 不等于num += num print(num) sum(a) print(a)
输出结果:[100,100]
[100]
a = [100] def sum(num): num += num print(num) sum(a) print(a)
输出结果:[100,100]
[100,100]
标签:nbsp pos style 等于 gpo def python bsp blog
原文地址:https://www.cnblogs.com/sineik/p/8595985.html