user_info = {
'city',
'citya',
'citys',
'cityd',
'cityf',
}
counter=0
def submit(x):
print(x)
for i in user_info:
cur_entrybox = ttk.Button(win, width=16,text=i,command=submit(i))
cur_entrybox.grid(column=1, row=counter)
counter += 1
I want when I click the button to pass argument as the button name for EX: When I click a button with name "City" I want to make like this command=submit("city") Can any help me! Thanks