почему окно моментально закрывается? (pygame)
import pygame
scr = pygame.display.set_mode((500, 500))
scr.fill('green')
pygame.init()
f1 = pygame.font.Font(None, 50)
text = f1.render(
'there is nothing', True, (255, 215, 0)
)
scr.blit(text, (150, 300))
rect = pygame.Rect(150, 50, 200, 80)
pygame.draw.rect(scr, 'red', rect=rect)
Источник: Stack Overflow на русском