import pygame object1 = pygame.Rects((20, 50), (50, 100)) print(object1.collidepoint(50, 75))