MySQL Forums :: Connector/Python :: Prime Lazy List Help

Advanced Search

Prime Lazy List Help
Posted by: wryfhk22 jiji ()
Date: April 13, 2011 10:14PM

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.


Options: ReplyQuote

Subject Written By Posted
Prime Lazy List Help wryfhk22 jiji 04/13/2011 10:14PM
Re: Prime Lazy List Help Geert Vanderkelen 04/19/2011 05:39AM
Re: Prime Lazy List Help Roy Stubbs 04/23/2011 01:34PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.