title: Pygame remove a single sprite from a group
body: <p>I am making a game and when the sprite goes under 100 on the x axis it is supposed to be deleted. The sprites are all located in a class. When the first sprite reaches the end, it deletes the final sprite of the group instead of the first.</p>
  
  <p>Enemy Class</p>
  
  <pre class="lang-py prettyprint-override"><code>class Enemy(pygame.sprite.Sprite): 
      def __init__(self,x,y):
          pygame.sprite.Sprite.__init__(self)
          self.image = pygame.image.load('Enemy.gif').convert()
          self.rect = self.image.get_rect(x=x, y=y)
  
      def update(self):
         self.rect.x -= 4
  
      def die(self):
          for enemy in EnemyList:
              if enemy.rect.x&lt;100:
                   EnemyList.remove(enemy)
  
      def draw(self, DISPLAY):
          DISPLAY.blit(self.image, self.rect)
  </code></pre>
  
  <p>Main Loop (Part for enemy)</p>
  
  <pre class="lang-py prettyprint-override"><code>time = 0
  while not Gameover: #Loop of the gameplay
  if time in (0,50,100,150,200):
      enemy = Enemy(DIS_HEIGHT,random.randrange(0,DIS_HEIGHT)
      enemy.add(EnemyList)
  EnemyList.update()
  EnemyList.draw(DISPLAY)
  enemy.die()
  time +=1
  </code></pre>
  
  <p>I have a background and everything else works fine, I just cannot delete the correct sprite from the enemy group.</p>