On 24-Jun-11 03:01 AM, kaustubh joshi wrote:
Hey all,
I am new here and new to python too. In general new to programming .
I was working on aproblem.
and need some help.
I have a list of numbers say [2,3,5,6,10,15]
which all divide number 30.
Now i have to reduce this list to the numbers which are prime in number.
i.e.
[2,3,5]
can somebody suggest?
K


You might try  writing the boolean function is_prime(n) for almost any n.

There was a recent discussion on this topic.

Colin W.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to