title: Can Python function arguments be used as in-function variables?
body: <p>I'm building an application that allows for user tracking of basketball scores. For example, if a team shoots a free throw, they press a 'Free Throw' button under the scoring team's header and one point is added to the displayed score. I'm using Python 3.x and want to know if I can write function arguments that will be specified as either the home or the away score variable and then have the specified score be updated. Currently, I have separate functions for each type of score for each team, meaning I essentially have duplicate code minus the differences in 'home' and 'away'. Both home and away score are saved as globals due to requirements for interfacing with other software. Am I stuck with 6 total functions, or can I write 3 and just specify which global I want updated when I call the function? Sample non working code attached </p>
  
  <pre><code>global away_score
  away_score = 0
  
  global home_score
  home_score = 0
  
  def plus_one(inc_score, inc_frame):
      inc_score += 1
      inc_frame.config(text = inc_score) # this is for interfacing with tkinter
  </code></pre>