title: Python, correct way to pass variables between functions
body: <p>I'm trying to make a game in python using the pygame module.</p>
  <pre><code>def draw_character(self, color, box):
      rect = pygame.Rect(box)
      pygame.draw.rect(self.game.display, (color), pygame.Rect(rect))
      return rect
  </code></pre>
  <p>and in the draw_character function preserves the collision shape of the character</p>
  <p>move function:</p>
  <pre><code>def move(self, rect):
     if rect.bottom &gt;= self.game.DISPLAY_H:
          print(&quot;work&quot;)
  </code></pre>
  <p>and finally I call the function like this</p>
  <pre><code>self.move(self.draw_character((221,171,177), (self.f1, self.f2, 60, 60)))
  </code></pre>
  <p>Is there another way I can call the rect variable or am I already doing this correctly</p>