how to use a functionas an optionmenu option python tkinter code example
Example: python optionmenu tkinter
from tkinter import Tk, StringVar, OptionMenu, mainloop
parent = Tk()
varList = StringVar(parent)
varList.set("Red")
om = OptionMenu(parent, varList, "Yellow", "Pink", "RED", "Brown", "Black", "Blue")
om.pack()
parent.mainloop()