📅  最后修改于: 2022-03-11 14:45:31.889000             🧑  作者: Mango
import pygame
running = True
while running:
for event in pygame.event.get_pressed():
if event.type == pygame.QUTI:
running = False
if not(running):
pygame.quit()
break #you got the error because you didn't completely close pygame so add
#so add break after pygame.quit()