Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- league = {'Phillies': [662, 476], 'Braves': [610, 550], 'Mets': [656, 687]}
- total_runs_scored = 0
- total_runs_allowed = 0
- for team, scores in league.iteritems():
- total_runs_scored += float(scores[0])
- total_runs_allowed += float(scores[1])
- team_removed_runs = {}
- for team, scores in league.iteritems():
- team_removed_runs[team] = [total_runs_scored - scores[0], total_runs_allowed - scores[1]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement