Compute prime numbers in Python : filter : Buildin Function : Python examples (example source code) Organized by topic

C++
PHP
Python


Python  »  Buildin Function   » [  filter  ]  Screenshots 
 



Compute prime numbers in Python





nums = range(250
for i in range(28)
     nums = filter(lambda x: x == i or x % i, nums)
 
print nums



           
       
Related examples in the same category
1.  Filter demo: lambda function inside Filter demo: lambda function inside
2.  Functional Programming Tools: filter Functional Programming Tools: filter
3.  filer with lambda function and range filer with lambda function and range
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.