gui programming iii 'all files ''')] open(filenameread(textbox insert( smainloop( menu bars we can create menu barlike the one belowacross the top of window here is an example that uses some of the dialogs from the previous sectionfrom tkinter import from tkinter filedialog import def open_callback()filename askopenfilename(add code here to do something with filename def saveas_callback()filename asksaveasfilename(add code here to do something with filename root tk(menu menu(root config(menu=menufile_menu menu(menutearoff= file_menu add_command(label'open 'command=open_callbackfile_menu add_command(label'save as 'command=saveas_callbackfile_menu add_separator(file_menu add_command(label'exit 'command=root destroymenu add_cascade(label'file 'menu=file_menumainloop( new windows creating new window is easy use the toplevel functionwindow toplevel(