Get your
own Python
server
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
import tkinter as tk window = tk.Tk() window.geometry("300x200") fruits = ["Apple", "Banana", "Cherry"] def show(): selected = listbox.curselection() if selected: choice = listbox.get(selected[0]) label.config(text=choice) listbox = tk.Listbox(window, height=4) listbox.pack() for fruit in fruits: listbox.insert(tk.END, fruit) button = tk.Button(window, text="Show", command=show) button.pack() label = tk.Label(window) label.pack() window.mainloop()