1. reversed() a = [1, 2, 3, 4] for i in reversed(a): print(i) 2. range(len(a)-1, -1, -1) a = [1, 2, 3, 4] for i in range(len(a)-1, -1, -1): print(a[i]) 3. range(len(a)) + ~操作符 ~按位取反运算符:对数据的每个二进制位取反,即把1变为0,把0变为1 .~x 类似于 -x-1 a = [1, 2, 3, 4] for i in…