List of paths

Nico Grubert nicogrubert at gmail.com
Wed Apr 1 10:16:32 EDT 2009


> May be not so much pythonic, but works
> 
> for i in range(len(q)):
>     for x in q[i:]:
>        if x.startswith(q[i]) and x!=q[i]:
>            q.remove(x)

...but works fine. Thanks, Eugene.
Also thanks to Andrew. Your example works fine, too. Thanks to remind me 
of the 'yield' statement! ;-)

Regards
Nico



More information about the Python-list mailing list