get mouse postition python

>>> import pyautogui
>>> pyautogui.position()

Here is what the above code is Doing:
1. The pyautogui.position() function returns a tuple of two integers for the x- and y-coordinates of the mouse cursor’s current position.
2. The print() function displays the x- and y-coordinates on the screen.
3. The pyautogui.moveTo() function moves the mouse cursor to the x- and y-coordinates specified.
4. The function simulates a mouse click at the x- and y-coordinates specified.
5. The pyautogui.dragTo() function simulates a mouse drag from the current position of the mouse cursor to the x- and y-coordinates specified.
6. The pyautogui.scroll() function simulates the mouse scroll wheel.
7. The pyautogui.typewrite() function simulates multiple key presses.
8. The function simulates a single key press.
9. The pyautogui.keyDown() and pyautogui.keyUp() functions simulate pressing and releasing a key, respectively.
10. The pyautogui.hotkey() function simulates pressing multiple keys at once.