ianfhunter / GNOLL

Redundant list comprehension can be replaced using generator PYL-R1728
Performance
Minor
4 months agoa year old
Consider using a generator instead 'sum(x for x in dice if x == y)'
 37
 38def tot_sides(y, dice):
 39    """Sum of dice equal to a value 'y'"""
 40    return sum([x for x in dice if x == y]) 41
 42
 43def count_sides(v, dice):