I am trying to call a function upon the user clicking on my Checkbox widget. I'm having difficulty with this as the trace variable itself is passed into the function.(I understand that it isn't the tkinter variable itself being passed, rather its contents)

**The Code**

```
#Image swapping code
mode = tk.IntVar()
checkBox = tk.Checkbutton(root,text=": World Mode",variable = mode)
checkBox.grid(row=3,column=3)
def swapimages(num):
    print(num)
    if num==1:
        imageLabel.configure(image = ukImg)
    else:
        imageLabel.configure(image = worldImg)
mode.trace("w", lambda: swapimages(mode.get()))

```

**Error**

I receive this error

```
TypeError: <lambda>() takes 0 positional arguments but 3 were given

```

This error does not occur when I use lambda for buttons e.g

```
generateButton = tk.Button(root,text="Generate!",command=lambda: getLatLong(inputtedPostcode.get()))

```