mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08: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