Tkinter OptionMenu Create items with tuple
When there are more items in the list, we can build the list items in a tuple and then put the tuple data into the OptionMenu() constructor.
Example#1
Use tuples to store list items.
from tkinter import *
root = Tk()
root.title("apidemos.com")
root.geometry("300x180")
omTuple = ("Python","Java","C") # Use Tuple
# omTuple = ["Python","Java","C"] # Use List
var = StringVar(root)
optionmenu = OptionMenu(root,var,*omTuple)
optionmenu.pack()
root.mainloop()
Output: