NP30 用列表实现队列

This commit is contained in:
轩辕龙儿 2022-10-26 15:54:21 +08:00
parent 603ffc167f
commit afe610bfe2

18
NP/NP30.py Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env python3
# @author 轩辕龙儿
# @date 2022/10/26
# @file NP30.py
def solution():
num = int(input())
queue = [1, 2, 3, 4, 5]
queue.pop(0)
print(queue)
queue.pop(0)
print(queue)
queue.append(num)
print(queue)
if __name__ == "__main__":
solution()