It is given the value that is clicked. To demonstrate, consider this script:
from tkinter import Tk, OptionMenu, StringVar
root = Tk()
def func(val):
print(val)
var = StringVar()
OptionMenu(root, var, "one", command=func).grid()
root.mainloop()
When run (and when I click on the option "one" in the optionmenu), it prints "one" in the terminal.
So, in summary, add val
(or any other argument name) to your function declaration and it will work:
def typeupdate(val):