8-19分享

1. json序列化时,默认遇到中文会转换成unicode,如果想要保留中文怎么办?

2. 下面这段代码的输出结果将是什么?请解释

class Parent(object):
    x = 1
class Child1(Parent):
    pass
class Child2(Parent):
    pass

print(Parent.x,Child1.X,Child2.X)
Child1.X = 2
print(Parent.x,Child1.X,Child2.X)
Parent.X = 3
print(Parent.x,Child1.X,Child2.X)

3.面向对象实现一个栈(栈是后进先出的)

原文地址:https://www.cnblogs.com/a438842265/p/11376225.html