for x in range(6):
for y in range(4):
button = Button(command = lambda x=x, y=y:show_symbol(x,y),width
=4, height = 2)
button.grid(column = x, row = y, padx = 10, pady =10)
buttons[x,y] = button
button_symbols[x,y] = symbols.pop()
root.mainloop()
The above code is for a matchmaker game I am working on. I understand everything in the nested FOR loops except for the lambda function.