在线名词解释大全 - Python程序设计 - 详细

13 Whatwillbedisplayedbythefollowingcode?()class A:def __init__(self,i= 2,j= 3):self.i=iself.j=jdef __str__(self):return "A"def __eq__(self,other):return self.i*self.j==other.i*other.jdef main():x=A(1, 2)y=A(2, 1)print(x==y)main()

A
True
B
False
C
2
D
1
正确答案:
相关推荐
扫描二维码
关注公众平台