Grimsqueaker wrote: > That seems to give me the items in the list back in an iterator. Am I > using it incorrectly?
With Dan's functions in cartesian.py you can do the following: >>> from cartesian import * >>> def count(digits): ... args = [] ... while 1: ... args.append(digits) ... for n in string_cartesian_product(*args): ... yield n ... >>> from itertools import islice >>> print " ".join(islice(count("abc"), 30)) a b c aa ab ac ba bb bc ca cb cc aaa aab aac aba abb abc aca acb acc baa bab bac bba bbb bbc bca bcb bcc Peter -- http://mail.python.org/mailman/listinfo/python-list