W3Schools Tryit Editor
[
フレーム
]
Run ❯
Get your
own Python
server
Go to Spaces
Ctrl+Alt+P
queue = [] # Enqueue queue.append('A') queue.append('B') queue.append('C') print("Queue: ", queue) # Peek frontElement = queue[0] print("Peek: ", frontElement) # Dequeue poppedElement = queue.pop(0) print("Dequeue: ", poppedElement) print("Queue after Dequeue: ", queue) # isEmpty isEmpty = not bool(queue) print("isEmpty: ", isEmpty) # Size print("Size: ", len(queue))
Queue: ['A', 'B', 'C']
Peek: A
Dequeue: A
Queue after Dequeue: ['B', 'C']
isEmpty: False
Size: 2
AltStyle
によって変換されたページ
(->オリジナル)
/
アドレス:
モード:
デフォルト
音声ブラウザ
ルビ付き
配色反転
文字拡大
モバイル