...IndexError: list assignment index out of range - 静静地挖坑...
代码: t = [-10,-3,-100,-1000,-239,1]#交换 -10和1的位置t[5], t[t[5]-1] = t[t[5]-1], t[5] 报错: IndexError: list assignment index out of range 数组: >>>t [-10,-3,-100,-1000,-239,-10] 为什么? 等式右边t[t[5]-1]相当于t[0],是对值-10的引用.首先是将t[5]...