首页 试题广场 > 试题详情
问答题

【C601035】以下的代码的输出将是什么? 说出你的答案并解释
class Parent(object):
x = 1
class Child1(Parent):
pass
class Child2(Parent):
pass
print Parent.x, Child1.x, Child2.x
Child1.x = 2print Parent.x, Child1.x, Child2.x
Parent.x = 3print Parent.x, Child1.x, Child2.x

回复可见正确答案
下一题 上一题
Ke星伙伴们的回答/ 24个回答 添加答案
关闭
关闭

了解
畅学卡

手机端
学习