title: How do I run a method for all instances of the class
body: <pre><code>class Planet:
    def __init__(self, name, radius, colour, speed, distance, mass, angle, orbitcentrex, 
    orbitcentrey):
      self.x = None
      self.y = None
      self._name = name
      self._radius = radius
      self._colour = colour
      self._speed = speed
      self._distance = distance
      self._angle = angle
      self._centreX = orbitcentrex
      self._centreY = orbitcentrey  
  
    def updateSpeed(*planets):
      planets._speed += (0.2*(planets._speed))
  
  Sun = Planet(&quot;Sun&quot;, 50, SunColour, 0, 0, 0, 0, size[0] / 2, size[1] / 2)
  Mercury = Planet(&quot;Mercury&quot;, 4, MercuryColour, 0.00477, 70, 0, random.uniform(0, 6.2832), size[0] / 2, size[1] / 2)
  Venus = Planet(&quot;Sun&quot;, 5.5, VenusColour, 0.00354, 125, 0, random.uniform(0, 6.2832), size[0] / 2, size[1] / 2)
  Earth = Planet(&quot;Earth&quot;, 6, EarthColour, 0.003, 180, 0, random.uniform(0, 6.2832), size[0] / 2, size[1] / 2)
  Mars = Planet(&quot;Mars&quot;, 4, MarsColour, 0.002424, 235, 0, random.uniform(0, 6.2832), size[0] / 2, size[1] / 2)
  Jupiter = Planet(&quot;Jupiter&quot;, 17, JupiterColour, 0.001317, 290, 0, random.uniform(0, 6.2832), size[0] / 2, size[1] / 2)
  Saturn = Planet(&quot;Saturn&quot;, 12, SaturnColour, 0.000975, 345, 0, random.uniform(0, 6.2832), size[0] / 2, size[1] / 2)
  Uranus = Planet(&quot;Uranus&quot;, 10, UranusColour, 0.000684, 400, 0, random.uniform(0, 6.2832), size[0] / 2, size[1] / 2)
  Neptune = Planet(&quot;Neptune&quot;, 10, NeptuneColour, 0.000546, 455, 0, random.uniform(0, 6.2832), size[0] / 2, size[1] / 2)
  Pluto = Planet(&quot;Pluto&quot;, 4, PlutoColour, 0.000471, 510, 0, random.uniform(0, 6.2832), size[0] / 2, size[1] / 2)
  
  for event in pygame.event.get():
    if event.type == pygame.MOUSEBUTTONDOWN and 30 &lt; Mouse[0] &lt; 195 and 155 &lt; Mouse[1] &lt; 220:
      Planet.updateSpeed(Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto)
  </code></pre>
  <p>I'm trying to use *args to pass in all of my planets as arguments when running the updateSpeed method. However it can't do this because the *args creates a tuple of the planet names. Is there any way to get arround this so I don't have to write individual lines to change the speed of each planet. What I had before was this:</p>
  <pre><code>if event.type == pygame.MOUSEBUTTONDOWN and 30 &lt; Mouse[0] &lt; 195 and 250 &lt; Mouse[1] &lt; 315:
    click.play()
    Mercury._speed += 0.002862
    Venus._speed += 0.002124
    Earth._speed += 0.0018
    Mars._speed += 0.0014544
    Jupiter._speed += 0.0007902
    Saturn._speed += 0.0005850
    Uranus._speed += 0.0004104
    Neptune._speed += 0.0003276
    Pluto._speed += 0.0002826
  </code></pre>
  <p>What I want to have is this:</p>
  <pre><code>if event.type == pygame.MOUSEBUTTONDOWN and 30 &lt; Mouse[0] &lt; 195 and 155 &lt; Mouse[1] &lt; 220:
    Planet.updateSpeed(Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto)
  </code></pre>