Skip to content

Commit

Permalink
fix deque
Browse files Browse the repository at this point in the history
  • Loading branch information
nkoroste authored Dec 4, 2024
1 parent af532e9 commit f893ead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ from collections import deque
queue = deque() # Initialize
queue.append(1) # Enqueue
print(queue.popleft()) # Dequeue (FIFO)
print(queue.popright()) # LIFO: Remove and return last sampe as pop()
print(queue.pop()) # LIFO: Remove and return last element
```

#### Using queue.Queue (Thread-Safe):
Expand Down

0 comments on commit f893ead

Please sign in to comment.