Other useful methods when working with pygame events are
poll()will return the first event from the queue. Once used, that event will be removed.
if pygame.event.poll() == pygame.KEYUP: print("Upward!")
wait()will return the first event from the queue, or wait for the next event that occurs. You can pass an integer as a parameter that will specify how long the method will wait for an event.
if pygame.event.wait(1000) == pygame.KEYDOWN: print("Down down down...")
peek()will return a boolean depending on whether or not there are events in the queue. If you pass an event in, the method will check if that event is in the queue. If you pass a sequence of events into the method, it will return
Trueif any one of those events are present in the queue.
clear()will remove event(s) from the given event or sequence of events. If nothing is inputted into the method, all events will be removed from the queue.