Skip to content

Commit

Permalink
Merge pull request #2 from jherland/patch-2
Browse files Browse the repository at this point in the history
Use generator instead of list comprehension
  • Loading branch information
JonJagger committed Jan 13, 2015
2 parents 50a1762 + de8a5ec commit fdfbbc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pf/yatzy/yatzy.py
Expand Up @@ -22,7 +22,7 @@ def score_ones(dice):


def score_twos(dice):
return sum([d for d in dice if d == 2])
return sum(d for d in dice if d == 2)


def score_threes(dice):
Expand Down

0 comments on commit fdfbbc5

Please sign in to comment.