In my code I was messing around and created code that looked something like this
def checkformouseclick(): eventlist = pygame.event.get() for i in eventlist: if i.type == pygame.MOUSEBUTTONDOWN: print("Mousebuttondown") else: print("Mousebutton not down")
Main Loop: checkformouseclick() second_event_list = pygame.event.get(): for j in second_event_list: if j.type == pygame.QUIT: break mainloop
I then decided to print out each "index" of each individual list(i.e. print(i.type), print(j.type)) and found that unexpected things were happening. For example, I would create events by clicking on the screen and smashing my keyboard but these events would show up in one of the event lists but not the other. Why is that the case?
Thanks for any answers, sorry if I'm being an idiot.