(very new to python)i have this code below and i am wondering how i can hold the window open for a set amount of time then close the window. can anybody help me? anything helps
i really have no idea how to do this and i cant find anything about it anywhere. any help are suggestions would be greatly appreciated
import pygame
window_x=600
window_y=600
background=(255,200,255)
pygame.init()
world=pygame.display.set_mode([window_x,window_y])
game_on=True
while game_on:
world.fill(background)
pygame.display.flip()
This is a way you can do something like this without freezing your program with the time library.