def demo(): global c #使用global修饰符转变为全局变量 a =1 b =2 c = a+bdef run(): demo() print(c)if __name__ == '__main__': run()