Very nice explanation! I've circumvented the problem by returning a `deepcopy` of the list. I've also added an acknowledgment. The revised code is attached.
I'd like to see both balls in numbered boxes (this code) and balls in unnumbered (indistinguishable) boxes in Python's `itertools` module, but don't know whom to contact about this. Also, I haven't yet worked out a good algorithm for balls in unnumbered boxes. Any suggestions will be appreciated. Phillip http://old.nabble.com/file/p32439307/balls_in_numbered_boxes.py balls_in_numbered_boxes.py -- View this message in context: http://old.nabble.com/can%27t-generate-iterator-from-list-tp32435519p32439307.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list