disgrating a list

jwaixs jwaixs at gmail.com
Fri Sep 1 18:29:28 EDT 2006


Thank you for all your reply and support. Neil's fits the most to me. I
shrinked it to this function:

def flatten(x):
    for i in range(len(x)):
        if isinstance(x[i], list):
            x[i:i+1] = x[i]

Thank you all again. If someone could find even a cuter way, I'd like
to see that way.

Noud Aldenhoven




More information about the Python-list mailing list