'How to continue playing the game where it been left off

def pause_screen():

paused = True

while paused:
for event in pygame.event.get():
  if event.type == pygame.QUIT:
    pygame.quit()
    quit_game

  if event.type == pygame.KEYDOWN:
    if event.key == pygame.K_c:
      paused = False

  screen.fill(WHITE)
  largeText = pygame.font.Font(None,50)
  screen.blit(largeText.render("Paused!",True,BLUE),(135,40))
  largeText = pygame.font.Font(None,35)
  screen.blit(largeText.render("Pressed c to continue the game!",True,BLUE),(135,40))
  button("Quit", 130, 350, 150, 60, RED, GREEN, quit_game)
  button("Return to main menu", 130, 450, 350, 60, RED, GREEN, front_page)

  pygame.display.update()
  pygame.display.flip()
  clock.tick(60)

      if keys[pygame.K_p]:
      return pause_screen
     if keys[pygame.K_c]:
      return menu

I am making a ping pong game, currently when I pressed p key it takes my to the paused menu, however when I press the c key it doesn't take me back to the game where it left off



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source