def check(l):
while len(l)>5:
del(l[5:])
return l
print(check([1,2,3,4,5,6,7,8,9,10]))
del(l[2]):这个对吗?
def test(l):
newl = []
for i in range(1,len(l),2):
newl.append(l[i])
return newl
l = [1,2,3,4,5,6,7,8,9]
print(test(l))