kj wrote:
Switching from Perl here, and having a hard time letting go... Suppose I have an "array" foo, and that I'm interested in the 4th, 8th, second, and last element in that array. In Perl I could write: my @wanted = @foo[3, 7, 1, -1];
Could you explain your use case? It could be that a list isn't the appropriate data structure.
Cheers, Brian -- http://mail.python.org/mailman/listinfo/python-list