I started coding 3 days ago! So far it has been fun, but I have encoured my first road block. I'm wanting to create a "FILE" button that performs all the same functions as it would in any other application: Open, Save, and Save as. What I can do so far is click the file button to expose my three options.
from tkinter import *
root = Tk()
def MyFiles():
my_ListFile = Listbox(root, selectmode="single", bg="light grey", width=18, height=3, font=('Helvetica 10'))
my_ListFile.place(x=0, y=27)
# Additing items to list box
my_ListFile.insert(END, "Open")
my_ListFile.insert(END, "Save")
my_ListFile.insert(END, "Save As")
def oneselect(event):
listB = event.widget
idx = int(listB.curselection()[0])
value = w.get(idx)
# if the value is open, then open the directory and close the listbox
# if the value is Save, then save the current GUI and close the listbox
#if the value is Save As, open directory and close list box
File = Button(root, text="File", command=MyFiles, width=15, font=('Helvetica 10')).place(x=1, y=1)
root.mainloop()
How can I click each option in the list to perform a different function? I'm attempting to build a GUI.

Menuand you might as well want to search forfiledialog.