第一种:
class test():
...: num = 0
...:
test1 = test()
test1.num
0
第二种:
person2 = type("person",(),{"num":0})
p2 = person2()
p2.num
0
第一种:
class test():
...: num = 0
...:
test1 = test()
test1.num
0
第二种:
person2 = type("person",(),{"num":0})
p2 = person2()
p2.num
0