title: Iterating over two argument function python
body: <p>This is a follow-up on a question I posted earlier today, and I think I've cleaned up my code and narrowed down my issue.</p>
  
  <p>I am trying to build a simple program to help me with a fantasy football draft. </p>
  
  <p>The problem seems to be that it is storing the pick to every team instead of just one. This should be done with the <code>store_pick</code> function.</p>
  
  <p>MCVE:</p>
  
  <pre><code># This is designed as league set up
  class Teams(object):
      def __init__(self, name, draft_position, me):
          self.name = name
          self.draft_position = draft_position
          self.me = me
      roster = {"QB" : "empty", "RB1" : "empty", "RB2" : "empty", "WR1" : "empty ", "WR2" : "empty", "WR3" : "empty", "TE" : "empty", "Flex" : "empty", "K" : "empty", "DEF" : "empty"}
      bench = {}
  Team1 = Teams("Team1", 1, False)
  Team2 = Teams("Team2", 2, False)
  Team3 = Teams("Team3", 3, False)
  
  draft_order = [Team1, Team2, Team3]
  
  class Player(object):
      def __init__(self, name, fantasypros, adp, yahoo_rank, myrank, position):
          self.name = name
          self.fantasypros = fantasypros
          self.adp = adp
          self.yahoo_rank = yahoo_rank
          self.myrank = myrank
          self.position = position
      def mock_pick(self):
          return (self.fantasypros + self.adp + self.yahoo_rank)/3.0
  
  
  player_data = [("Leveon Bell", 1, 1, 5, 1, "RB"), 
                 ("Adrian Peterson", 2, 2, 1, 16, "RB"), 
                 ("Jamaal Charles", 3, 3, 3, 7, "RB")] 
  player_list = [Player(*player) for player in player_data]
  mock_list = [Player(*player) for player in player_data]
  
  def store_pick(z, y): #this is where Im having issues
      print z in mock_list
      if z.position == "RB":
          if y.roster["RB1"] == "empty":
              print y.name
              y.roster["RB1"] = z.name
          elif y.roster["RB2"] == "empty":
              y.roster["RB2"] = z.name
      elif z.position == "WR":
          if y.roster["WR1"] == "empty":
              y.roster["WR1"] = z.name
          elif y.roster["WR2"] == "empty":
              y.roster["WR2"] = z.name
          elif y.roster["WR3"] == "empty":
              y.roster["WR3"] = z.name
      elif z.position == "TE":
          if y.roster["TE"] == "empty":
              y.roster["TE"] = z.name
  def remove_pick(z):
      print z in mock_list
      mock_list.remove(z)
  
  def grind(l):
      mock_results = []
      grind_count = 0
      while grind_count &lt; len(mock_list):
          for i in l:
              mock_results.append(i.mock_pick())
              grind_count += 1
      return mock_results
  def mock_analyzer(l):
      return min(l)
  def pick(b): # this chooses a player
      if not t.me:
          for p in mock_list:
              if p.mock_pick() == mock_analyzer(grind(mock_list)):
                  if grind(mock_list).count(p.mock_pick()) == 1: #this should figure out if there is a tie
                      if p.position == "RB":
                          if t.roster["RB1"] == "empty":
                              return p
                          elif t.roster["RB2"] == "empty":
                              return p
       else:
           return raw_input("your turn")
  
  # initial draft round code
  def mockround(a):
      pick_count = 0
      if a % 2 != 0:
          round_order = draft_order
      else:
          round_order = draft_order.reversed()
      for t in round_order:
          print t.name,
          print "are projected to select"
          d = pick(t)
          print d.name
          remove_pick(d)
          store_pick(d, t)
          pick_count += 1
          print t.name,
          print t.roster
          print Team2.name,
          print Team2.roster
          print Team3.name,
          print Team3.roster
  
  
  
  
  mockround(1)
  </code></pre>