I'm a bit confused with the method key.get_pressed()
So I have checked the pygame website, and it says that the method will "returns a sequence of boolean values representing the state of every key on the keyboard.....and use the key constant values to index the array"
.
I saw people writting codes like:
keys = pygame.key.get_pressed()
if keys[pygame.K_LEFT]:
......
Here is the question: pygame.key.get_pressed()
actually returns a tuple, so how can people use a bracket to index the value? I mean it should be like "tuple[sequence]"
, right?