def a(x): print('%s'%x) x=1 def b(): x=2 print('%s'%x) def c(): x=3 print('%s'%x) c() b() a('ok') 转载于:https://www.cnblogs.com/shengbei/p/9029571.html