Как добавить картинку в код Python с помощью класса photoimage

def start_work(self):
    self.canva.delete(self.txt_start)

    self.car_list = [
        PhotoImage(file="car1.png"),
        PhotoImage(file="car2.png"),
        PhotoImage(file="car3.png"),
        PhotoImage(file="car4.png"),
        PhotoImage(file="car5.png"),
        PhotoImage(file="car6.png"),
        PhotoImage(file="car7.png"),
        PhotoImage(file="car8.png")
    ]
    self.random_car = random.choice(self.car_list)

    self.servis1_img = PhotoImage(file="s1.png")
    self.servis2_img = PhotoImage(file="s2.png")
    self.servis3_img = PhotoImage(file="s3.png")
    self.servis4_img = PhotoImage(file="s4.png")

    self.car = self.canva.create_image(580, 690, image=self.random_car)

Ответы (0 шт):