Beginner Question

Kevin Reeder avail at
Fri Mar 28 04:03:40 CET 2003

On Thu, 27 Mar 2003 18:23:12 -0800, Garry Knight wrote:

> Kevin Reeder wrote:
>>[i],[j] =[j],[i]
>> The problem is to rewrite the last line without using a sequence
>> assignment.
> One way is by using a temporary variable:
>         t =[i]
>[i] =[j]
>[j] = t
And that may be what they're getting at as a way to make me analyze the
process, but isn't the sequence assignment more or less an abbreviated way
of doing the same thing? I've been thinking that there is some other
way that is eluding me.


More information about the Python-list mailing list