以下Python继承类代码的输出结果是什么?
class A:
def __init__(self):
self.x = 1
class B(A):
def __init__(self):
super().__init__()
self.y = 2
b = B()
print(b.x, b.y)
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析