def sums(arg1, arg2):
total = arg1 + arg2
print("函数内 : ", total)
return total
total = sums(10, 20)
print("函数外 : ", total)
“total”那里显示:Shadows name 'total' from outer scope。
def sums(arg1, arg2):
total = arg1 + arg2
print("函数内 : ", total)
return total
total = sums(10, 20)
print("函数外 : ", total)
“total”那里显示:Shadows name 'total' from outer scope。
2 回答5.1k 阅读✓ 已解决
2 回答1.1k 阅读✓ 已解决
4 回答1k 阅读✓ 已解决
3 回答1.1k 阅读✓ 已解决
3 回答1.2k 阅读✓ 已解决
1 回答1.7k 阅读✓ 已解决
1 回答1.2k 阅读✓ 已解决