import pyautogui # pip install pyautogui # simulate a left-click with the mouse (at the current mouse position) pyautogui.click(button='left')