question # 5\nmultiple choice\nwhich method adds an element at the beginning of a deque?\naddleft\npopleft\na…

question # 5\nmultiple choice\nwhich method adds an element at the beginning of a deque?\naddleft\npopleft\nappendleft\ninsertleft
Answer
Brief Explanations:
In Python's collections.deque (double - ended queue), the appendleft method is used to add an element to the beginning (left - hand side) of the deque. addleft is not a valid method for deque. popleft is used to remove and return the left - most element. insertleft is not a standard method for deque.
Answer:
C. appendleft