mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 23:11:09 +00:00
parent
4617aa78b2
commit
189b350312
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user