Bug with lists of pairs of lists and append()
zachREMOVE at MEin.tu-clausthal.de
Mon Oct 1 11:33:55 CEST 2007
> I'm using list(l) to copy the list, Tero uses l[:], but the idea is
> the same.
Thanks a lot for your response and the hint.
> But do you just want all proper partitions of lst? Then this is much
> lst = [0, 1, 2]
> s = [(lst[:i], lst[i:]) for i in range(1, len(lst))]
Ah, thanks a lot for that nice line of code!
Python keeps astonishing me ;-)
Life is so constructed that the event does not, cannot,
will not match the expectation. (Charlotte Bronte)
zach in.tu-clausthal.de __@/' www.gabrielzachmann.org
More information about the Python-list