Beginner Question

Alex Martelli aleax at
Fri Mar 28 12:11:58 CET 2003

Lee Harr wrote:
>>[i],[j] =[j],[i]
>> The problem is to rewrite the last line without using a sequence
>> assignment. Everything I've thought of has the result of only inserting

This produces different results from the original, though.  Not clear
to me if the specs include producing exactly the same results as the
original, but, if so, then:[j];[j][i];[i]=temp

might be the kind of approach the exercise's author had in mind.


More information about the Python-list mailing list