reversed(a) # 返回一个反转的迭代器 举例 a = [1, 2, 3, 4, 5] b = reversed(a) # b是一个迭代器 # print(list(b)) = [5, 4, 3, 2, 1] 相关文章: