When I run my program the pygame window opens and then it closes in my code I have only set the window size and the name so I don´t know why this is happening
import pygame
pygame.init()
win = pygame.display.set_mode([500, 500])
pygame.display.set_caption("First Game")`