题解 | #用列表实现队列#
用列表实现队列
https://www.nowcoder.com/practice/cc9e56e0d80d44e5990f76196adb4912
queue = [1,2,3,4,5]
number = int(input())
queue.pop(0)
print(queue)
queue.pop(0)
print(queue)
queue.append(number)
print(queue)
用列表实现队列
https://www.nowcoder.com/practice/cc9e56e0d80d44e5990f76196adb4912
queue = [1,2,3,4,5]
number = int(input())
queue.pop(0)
print(queue)
queue.pop(0)
print(queue)
queue.append(number)
print(queue)
相关推荐