def fun():
global s
s='eee'
def aun():
fun()#调用函数
print(s)
if __name__ == '__main__':
aun()
其中global s与gl.s用法相同

相关文章:

  • 2022-12-23
  • 2021-12-26
  • 2021-07-12
  • 2021-08-08
  • 2021-05-18
  • 2022-12-23
  • 2021-10-03
  • 2021-06-24
猜你喜欢
  • 2021-09-28
  • 2022-12-23
  • 2021-08-19
相关资源
相似解决方案