**This is the senction my code tried the event.get for both keydown and mouse press it's just not function and also I put them in a function there I can control them but I do not know is that because of this
def bullet_launch():
event_list = pygame.event.get()
for event in event_list:
if event.type == pygame.MOUSEBUTTONDOWN:
print("a")
cache = {
'image': pygame.transform.scale(pygame.image.load('assets/bullet.png'), (bullet_scale)),
'ypos': player["ypos"],
'xpos': player["xpos"],
'rad': math.radians(int(math.degrees(player["rad"])))
}
bullets.append(cache)