- What would be the output of the following code?
print(1)
class Car:
print(2)
def __init__(self, color):
print(3)
self.color = color
print(4)
print(5)
car1 = Car("red")
car2 = Car("green")
print(1)
class Car:
print(2)
def __init__(self, color):
print(3)
self.color = color
print(4)
print(5)
car1 = Car("red")
car2 = Car("green")