title: Is there an easier way to make 4 rows of 15 sprites?
body: <p>I'm pretty sure there is an easier way to do this, but I've either forgotten how to do it or it's more complicated than I think it is. Here's what I have:</p>
  <pre><code>class Block(pygame.sprite.Sprite):
      def __init__(self, color):
          super().__init__()
          self.image = pygame.Surface([25, 25])
          self.image.fill(color)
          self.color = color
          self.rect = self.image.get_rect()
  </code></pre>
  <p>This is the sprite I am going to be using.</p>
  <pre><code># Block
  margin = 50
  for i in range(15):
      block = Block(black)
      block.rect.x = 30 + margin*i
      block.rect.y = 25
      block_list.add(block)
  
  for i in range(15):
      block = Block(black)
      block.rect.x = 30 + margin*i
      block.rect.y = 75
      block_list.add(block)
      
  for i in range(15):
      block = Block(black)
      block.rect.x = 30 + margin*i
      block.rect.y = 125
      block_list.add(block)
  
  for i in range(15):
      block = Block(black)
      block.rect.x = 30 + margin*i
      block.rect.y = 175
      block_list.add(block)
  
  </code></pre>
  <p>When I am adding in the <code>block</code> sprite (in 4 rows of 15), I used four for loops to draw what I am trying to achieve. Is there a more simple way for me to do this? I'm almost certain that there is, but I can't seem to figure it out.</p>