Is there a Python module that already does this?

Brian Kelley bkelley at wi.mit.edu
Wed Feb 6 10:40:31 EST 2002


The formatting got a little screwed up, the delve function should be:

>
> def delve(input):
>    """(input)->recursively split input
>    i.e.
>    ('cat', 5, ['dog', [3, 3, 1]], 'zoo')
>    will reult in
>    ('c', 'a', 't', 5, 'd', 'o', 'g', 3, 3, 1, 'z', 'o', 'o')
>
>    warning, purposely uses maximum recursions!
>    """      

>    target = []
>    _delve(data, target)
>    return tuple(target)
>
>




More information about the Python-list mailing list