yet another noob question

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Sun Aug 13 15:45:04 EDT 2006


Simon Forman:
> I originally meant this as a joke and was going to say not to use it.
> But on my old, slow computer it only takes about a second or two.

Another possibility, still using a filter:

nodig = set("06789")
r = [i for i in xrange(11111, 55555+1) if not (set(`i`) & nodig)]

Bye,
bearophile




More information about the Python-list mailing list