Anagrams

sandipm sandip.more at gmail.com
Wed Oct 24 18:03:20 CEST 2007


hi,
 Is "all" inbuilt function in python? what it does?


> from itertools import ifilter, count
>
> def anagram_finder():
>      primes = ifilter(lambda p: all(p % k for k in xrange(2, p)), count(2))
                                  ^^^^
>      primeAlpha = dict(zip(string.lowercase, primes))
>      ...


--
sandip




More information about the Python-list mailing list