import pygame pygame.init() screen = pygame.display.set_mode((500, 1000)) while True: for event in pygame.event.get(): if event.type == pygame.QUIT: break pygame.display.flip()