Quantcast
Channel: MySQL Forums - Connector/Python
Viewing all articles
Browse latest Browse all 387

Prime Lazy List Help (no replies)

$
0
0
Is this a correct Lazy list for prime numbers? Also, it doesnt seem to print the filtered results when ran.
Any help?
Code: Select all
n = input( "Type number you want prime list to go up to.")
integers = range(1,n)
filter(lambda x : x%x == 1, integers)
When ran, and I type in 200, for example, it doesnt print anything. Im guessing I have the lambda part wrong, but am unsure.

Thanks.

Viewing all articles
Browse latest Browse all 387

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>