Answer
In Tkinter, the current mouse location can be obtained from the event object passed to the event-handling function by using the x and y attributes of the event object.
Work Step by Step
The code below shows an example of how to retrieve the mouse location when the mouse is clicked:
def get_mouse_location(event):
$\hspace{4mm}$x = event.x
$\hspace{4mm}$y = event.y
$\hspace{4mm}$print("Mouse clicked at", x, y)
canvas.bind("", get_mouse_location)
In this example, the get_mouse_location function is called whenever the left mouse button is clicked. The x and y attributes of the event object contain the mouse coordinates.