Комментарии:
class Car:
color = None
class Motorcycle:
color = None
def change_color(vehicle,color):
vehicle.color = color
car_1 = Car()
car_2 = Car()
car_3 = Car()
bike_1 = Motorcycle()
change_color(car_1,"red")
change_color(car_2,"white")
change_color(car_3,"blue")
change_color(bike_1,"black")
print(car_1.color)
print(car_2.color)
print(car_3.color)
print(bike_1.color)
love u
Ответить❤
ОтветитьMy two cents!
Ответитьthx 4 vid bro !
Ответитьcool, Bro
ОтветитьThanks bro
ОтветитьI'm sitting
I'm relaxing
And I'm really enjoying the show
Thanks bro
nice tutorial :)
ОтветитьGreat video bro
ОтветитьTy bro
ОтветитьThanks!
Ответитьthaaaaaaaaaaank you!!
ОтветитьGooo
ОтветитьWow!
ОтветитьGreat,,,,,
ОтветитьGreat
Ответитьkeep uploading. such a great effort and quality
ОтветитьThanks Bro!
Ответитьnice
ОтветитьThank you Bro!
ОтветитьLooking for it since ages xd finally got it
ОтветитьHello nice vid but i would like ask you the following question , how python knows that we pass a car object without declare it and also we can have access to its attributes? inside the function
ОтветитьThanks bro
Ответить