Comments on: Sonnet primes in Python
https://www.johndcook.com/blog/2013/01/08/sonnet-primes-in-python/
Applied Mathematics ConsultingFri, 26 May 2017 00:20:51 +0000hourly1By: Narcissus prime in Python — The Endeavour
https://www.johndcook.com/blog/2013/01/08/sonnet-primes-in-python/comment-page-1/#comment-95
Thu, 17 Jan 2013 12:54:20 +0000http://www.johndcook.com/blog/?p=12713#comment-95[…] I could rewrite them using Python. For example, I rewrote my code for finding sonnet primes in Python a few days ago. Next I wanted to try testing the Narcissus […]
]]>By: Rob Green
https://www.johndcook.com/blog/2013/01/08/sonnet-primes-in-python/comment-page-1/#comment-94
Tue, 08 Jan 2013 14:57:27 +0000http://www.johndcook.com/blog/?p=12713#comment-94Love the alignment of your code! Makes everything look beautiful, even poetic.
]]>By: Evpok
https://www.johndcook.com/blog/2013/01/08/sonnet-primes-in-python/comment-page-1/#comment-93
Tue, 08 Jan 2013 13:49:27 +0000http://www.johndcook.com/blog/?p=12713#comment-93Rather than filter, I would have used
sonnet_primes = (number for number in sonnet_numbers if isprime(number))

It is a bit more verbose, but it looks more obvious to me, especially in the context of mathematics
]]>