June 2017
Beginner
352 pages
8h 39m
English
Before we summarize, let's pull a few pieces of what we have made together and leave your computer computing the Lucas primes:
>>> for x in (p for p in lucas() if is_prime(p)):... print(x)...2371129471995212207357193493010349540185213702484516643838879119218851371560074829380168884650258839932361122672259149
When you've seen enough of these, we recommend you spend some time exploring the itertools module. The more you familiarize yourself with Python's existing support for iterables, the more elegant and concise your own code will become.
Read now
Unlock full access