关于python中函数的形参问题: def func(i): i=1 print i 上面这个函数无论传递什么参数运行结果都是1

2025-04-08 10:01:03
推荐回答(1个)
回答1:

你在函数中令i=1,再print i当然是1啊