This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients Y3Kv Bv, tim.peters
Date 2020-01-15.00:40:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579048844.65.0.53326658881.issue39338@roundup.psfhosted.org>
In-reply-to
Content
No problem!  If you are trying to swap the values in two variables `x` and `y`, in most languages that's spelled:

    temp = x
    x = y
    y = temp

and that works in Python too.  But in Python it's more common to do it with a one-liner:

    x, y = y, x
History
Date User Action Args
2020-01-15 00:40:44tim.peterssetrecipients: + tim.peters, Y3Kv Bv
2020-01-15 00:40:44tim.peterssetmessageid: <1579048844.65.0.53326658881.issue39338@roundup.psfhosted.org>
2020-01-15 00:40:44tim.peterslinkissue39338 messages
2020-01-15 00:40:44tim.peterscreate