I have a dropdown list. For each item I select from the dropdown, I was an image related to that item to show below the dropdown. I can do them separately but not sure how to put them together in tkinter
import tkinter as tk
from PIL import Image, ImageTk
fruitslist = [
"apple",
"orange",
"grapes",
"banana"
]
root = tk.Tk()
root.geometry('100x200')
def selc(event):
if clicked.get() == "orange":
img = ImageTk.PhotoImage(Image.open("image.jpg"))
la.configure(image=img)
la.image = img
else:
print("no image")
la = tk.Label(root, text="hi")
clicked = tk.StringVar(root)
clicked.set(fruitslist[0])
drop = tk.OptionMenu(root, clicked, *fruitslist, command = selc)
drop.pack()
root.mainloop()