For quick-and-dirty stuff, it's often convenient to flatten a sequence (which perl does, surprise surprise, by default):
[1,2,[3,"hello",[[4]]]] -> [1, 2, 3, 'hello', 4] One such implementation is at http://aspn.activestate.com/ASPN/Mail/Message/python-tutor/2302348 but something like this would be handy in itertools as well. It seems trivial, but I managed to screw up several times when trying to produce my own implementation (infinite recursion). -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list