title: In Pygame, how do I clear a blit to replace it with another?
body: <p>I am making a game and on the title screen, I want it to blit the new background (background1) when I press the return key while hovering at coordinates 278,365. How do I make it so that when I press enter at these coordinates, it removes the current background and replace it with the new background1?</p>
  
  <pre><code>screen=pygame.display.set_mode((1024,768),0,32)
  
  background=pygame.image.load(bif).convert()
  background1=pygame.image.load(wi1).convert()
  cursor=pygame.image.load(mif).convert_alpha()
  
  x,y =278,365
  
  
  while True:
      for event in pygame.event.get():
          if event.type == QUIT:
              pygame.quit()
              sys.exit()
  
          if event.type == KEYDOWN:
              if event.key == K_DOWN:
                  x=420
                  y=508
              elif event.key == K_UP:
                  x=278
                  y=365
  
              elif event.key == K_RETURN and x==420 and y==508:
                  pygame.quit()
                  sys.exit()
  
              elif event.key == K_RETURN and x==278 and y==365:
  
  
  
  
  
  
  
      screen.blit(background, (0,0))
      screen.blit(cursor, (x,y))
      pygame.display.update()
  </code></pre>