6 lines
118 B
Python
6 lines
118 B
Python
|
|
from collections import deque
|
||
|
|
stack = deque()
|
||
|
|
stack.append(value) # pushing
|
||
|
|
value = stack.pop()
|
||
|
|
not stack # is empty?
|