In my program, I'm trying to have an input right after the display screen is updated in pygame. I noticed for some reason the screen is only updated AFTER the user enters in an input, although the input function is after pygame.display.update(). Why does this happen, and how can the code be fixed?
# python 3.6.5
# pygame 1.9.3
def main():
pygame.draw.rect(screen,[235,235,235],(200,200,200,200))
pygame.display.update()
input('')
# input is shown first instead of the rectangle
I expected the rectangle to draw first and then the input, but the input occured first and then the screen was updated