已知代码如下:
class Plane():
def __init__(self, a, b, c):
self.a = a
self.b = b
self.c = c
planes = [Plane('战斗机', '黑色', '小型'),
Plane('客机', '白色', '中型'),
Plane('航母', '灰色', '超大型')]
for plane in planes:
print(plane.b, end=' ')
代码运行后控制台的效果是:()
黑色 白色 灰色
战斗机 客机 航母
小型 中型 超大型
客机 白色 中型