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 delete(): selected = listbox.curselection() if selected: listbox.delete(selected[0]) listbox = tk.Listbox(window, height=4) listbox.pack() for fruit in fruits: listbox.insert(tk.END, fruit) button = tk.Button(window, text="Delete", command=delete) button.pack() window.mainloop()