python实现list元素倒叙
摘要:def revList(lis): a = len(lis) if a > 1: b = a//2 for i in range(b): lis[i], lis[a-1-i] = lis[a-1-i], lis[i] #print(lis) return lis
阅读全文
posted @ 2022-06-04 02:44
posted @ 2022-06-04 02:44