Why does this list swap fail?

380162267qq at gmail.com 380162267qq at gmail.com
Mon Nov 14 13:44:27 EST 2016


L=[2,1]
L[0],L[L[0]-1]=L[L[0]-1],L[0]

The L doesn't change. Can someone provide me the detail procedure of this expression?



More information about the Python-list mailing list