list permutations and weired list.remove funtion

Tim Gahnström /Bladerman tim at
Mon May 14 19:05:43 EDT 2001

I am new to python and happende to use the function list.remov(elem) it sure
is usufull but it rendered me som hours of extra work until I found out that
it really dont return the list with the elemen removed.

[1,2,3].remove(2) == null
instead of
[1,2,3].remove(2) ==[1,3]

It seems like it would have been about no cost to let it work that way to?

Another question.
Is there an easy way to get al permutations of a list?

Thanks alot in advance

More information about the Python-list mailing list