python[::-1]

code = [22, 29, 30, 26, 24]
for i in range(len(code)-1)[::-1]:

则,code[i] = 26,code[i+1] = 24

posted @ 2023-04-24 10:21  dx670  阅读(61)  评论(0编辑  收藏  举报