Why the output is not 1 and 1?

前端 未结 0 1530
盖世英雄少女心
盖世英雄少女心 2021-01-27 14:07
a = 0
b = 0
def test():
    a = 1
    b = 1

    class Test:
        print(a, b)
        a = 2
test()

It gives

0 1

It sh

相关标签:
回答
  • 消灭零回复
提交回复
热议问题