1running = True
2while running:
3 for event in pygame.event.get():
4 if event.type == pygame.QUIT:
5 running = False
6 if running == False:
7 pygame.quit()
1running = Truewhile running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False