title: Getting a random.choice from a function parameter
body: <p>I'm new to python and I'm making a 2D Space Invader game using <code>PyGame</code>. I made a function to store the <code>x</code> and <code>y</code> coordinates, the <code>color</code> and the <code>health</code> of the ship. I used a <code>random.choice</code> module to randomly choose the color of the ship, but now I want to grab that color so I can modify the health of a specific ship color.</p>
  
  <p>code snippet of the random modules and the health stuff:</p>
  
  <pre><code>if len(enemies) == 0:
      level += 1
      for i in range(wave_length):
          enemy = Enemy(random.randrange(50, WIDTH-100), random.randrange(-1500*level/5, -100), random.choice(["red", "blue", "green"]))
          EnemyColor = Enemy(color)
          if EnemyColor == "red":
              health = 75
          elif EnemyColor == "blue":
              health = 50
          elif EnemyColor == "green":
              health = 25
  </code></pre>
  
  <p>code snippet of the enemy class:</p>
  
  <pre><code>class Enemy(Player):
      COLOR_MAP = {
                  "red": (RED_SPACE_SHIP, RED_LASER),
                  "green": (GREEN_SPACE_SHIP, GREEN_LASER),
                  "blue": (BLUE_SPACE_SHIP, BLUE_LASER)
                  }
  
      def __init__(self, x, y, color, health=100):
          super().__init__(x, y, health)
          self.player_img, self.laser_img = self.COLOR_MAP[color]
          self.mask = pygame.mask.from_surface(self.player_img)
  </code></pre>