* deque add pop

* deque add remove
This commit is contained in:
yijoonsu 2019-09-30 23:27:41 +09:00 committed by Christian Clauss
parent 4617aa78b2
commit 189b350312

View File

@ -37,3 +37,21 @@ de.reverse()
# printing modified deque
print("The deque after reversing deque is : ")
print(de)
# get right-end value and eliminate
startValue = de.pop()
print("The deque after popping value at end is : ")
print(de)
# get left-end value and eliminate
endValue = de.popleft()
print("The deque after popping value at start is : ")
print(de)
# eliminate element searched by value
de.remove(5)
print("The deque after eliminating element searched by value : ")
print(de)