def a3(arg): ret = [ ] for i in range(len(arg)): if i % 2 == 1: ret.append(arg[i]) else: pass return ret li = [11,22,33,44,55] r = a3(li) print(li) print(r)
时间: 2024-10-10 10:55:54
def a3(arg): ret = [ ] for i in range(len(arg)): if i % 2 == 1: ret.append(arg[i]) else: pass return ret li = [11,22,33,44,55] r = a3(li) print(li) print(r)