def last_item(lt, step):
while len(lt) >= step and step != 1:
lt.pop(step - 1)
lt = lt[step - 1:] + lt[:step - 1]
while len(lt) < step and len(lt) != 1:
n = step % len(lt)
lt.pop(n - 1)
else:
if step == 1:
return (lt[-1])
else:
return (lt[0])
#测试代码
lt = [1,2,3,4,5,6,7,8,9,10]
print(last_item(lt,12))