Skip to content

Commit

Permalink
Dict comprehension (could actually have been done when 2.6 was droppe…
Browse files Browse the repository at this point in the history
…d in #14
  • Loading branch information
liam-m committed Sep 22, 2019
1 parent 3edacd4 commit e58535b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion primes.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def sieve_of_atkin(limit):
limit_sqrt = int(limit ** 0.5)
s1, s2, s3 = set([1, 13, 17, 29, 37, 41, 49, 53]), set([7, 19, 31, 43]), set([11, 23, 47, 59])

squares = dict([(x, x**2) for x in range(1, limit_sqrt+1)])
squares = {x: x**2 for x in range(1, limit_sqrt+1)}

range24_1_4 = list(_range24(1, limit_sqrt + 1, 4)) # +4, +2, +4.. from 1
range24_2_2 = list(_range24(2, limit_sqrt + 1, 2)) # +2, +4, +2.. from 2
Expand Down

0 comments on commit e58535b

Please sign in to comment.