Advertisement
brcooley

Untitled

Sep 18th, 2011
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. league = {'Phillies': [662, 476], 'Braves': [610, 550], 'Mets': [656, 687]}
  2.  
  3. total_runs_scored = 0
  4. total_runs_allowed = 0
  5. for team, scores in league.iteritems():
  6.     total_runs_scored += float(scores[0])
  7.     total_runs_allowed += float(scores[1])
  8. team_removed_runs = {}
  9. for team, scores in league.iteritems():
  10.     team_removed_runs[team] = [total_runs_scored - scores[0], total_runs_allowed - scores[1]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement