How to set the condition execution step so that the execution of the action when SPACE is pressed is not continuous?
keys = pygame.key.get_pressed()
if keys[pygame.K_SPACE]:
print("spacebar is pressed")
new_bullet = Bullet(screen, gun)
bullets.add(new_bullet)