 def main(self, events, mousepos, id):     for event in events:         if event.type == pygame.QUIT:             exit()         if event.type == pygame.MOUSEBUTTONDOWN:             if self.rect(id, mousepos):                 if event.type == pygame.K_a:                     print("reached")                     self.dict_text[id] = []                     self.dict_text[id].append("a")                     self.surface.blit(self.font.render(f'{str(self.dict_text[id])}', self.antialias, (0, 0, 0)),                                       (self.x, self.y))                 else:                     print("didn't")              else:                 pass  