What do you understand by deque in python?
Answer / Kiran Kumar
In Python, 'deque' is a double-ended queue, which can be used for efficient appending and removing items from either end. It is implemented as a list, but provides faster average and maximum speed for insertion and deletion at both ends.n```nfrom collections import dequend = deque(['a', 'b', 'c'])nd.append('d') # adds to rearnd.popleft() # removes from frontn``
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the use of metaclass in python?
What are the types of literals in Python?
features of Python What are the essential?
How can you get the google cache age of any url or web page?
What are objects in python?
What exactly are pandas?
How to install python and prepare environment?
What is a sympy?
What applications can you build with python?
What is the cost of python certification?
What is __init__?
How does lambda function differ from a normal function in python?