import pygame cursor_position = pygame.mouse.get_pos() #returns a tuple : (x, y) of cursor print(cursor_position) print(f'X pos of cursor is : {cursor_position[0]}') print(f'Y pos of cursor is : {cursor_position[1]}')