内置函数补充:reversed()保留原列表,返回一个反向的迭代器 l = [1,2,3,4,5] l.reverse() print(l) l = [1,2,3,4,5] l2 = reversed(l) print(l2) l = (1,2,23,213,5612,342,43) sli = slice(1,5,2) print(l[sli]) print(l[1:5:2]) print(format('test', '<20')) print(format('test', '>40'))…