Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8378
| From | "Colin J. Williams" <cjw@ncf.ca> |
|---|---|
| Subject | Re: reg: playing with the list |
| Date | 2011-06-24 10:09 -0400 |
| References | <BANLkTi=Vyuc5xOoV+2vfRZPmhUT=hO0g5A@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.369.1308924616.1164.python-list@python.org> (permalink) |
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.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: reg: playing with the list "Colin J. Williams" <cjw@ncf.ca> - 2011-06-24 10:09 -0400 Re: reg: playing with the list Laurent Claessens <moky.math@gmail.com> - 2011-06-24 16:29 +0200
csiph-web