1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | from tkinter import * import time window = Tk() window.title('»çÁø ¾Ù¹ü') window.geometry('500x300') img_idx = 0 images = ['cat.png', 'dog.png', 'horse.png', 'rabbit.png'] length = len(images) imgList = [] for image in images : img = PhotoImage(file=image) imgList.append(img) lbl_img = Label(window, image = imgList[0]) lbl_img.pack() lbl = Label(window, text=images[img_idx], font="¹ÙÅÁ 20 bold") lbl.place(x=200, y=250) def Show() : global img_idx if img_idx == length-1 : img_idx = 0 else : img_idx += 1 lbl_img.configure(image=imgList[img_idx]) lbl.configure(text=images[img_idx]) window.update() # ¹Ýµå½Ã ÀÖ¾î¾ßÇÔ while True : time.sleep(3) Show() | cs |