head,tail= 0,5
while head < tail:
if head % 3 == 0:
print(q[head])
else:
q[tail] = q[head]
tail += 1
head += 1
微信扫码预览、分享更方便