207k views
3 votes
What is the missing line?

>>> myDeque = deque('abc')
_____
>>> myDeque
deque(['x', 'a', 'b', 'c'])
>>> myDeque.appendleft('x')
>>> myDeque.append('x')
>>> myDeque.insert('x')
>>> myDeque.insertleft('x')

User JDemler
by
7.7k points

1 Answer

6 votes

Answer:

the missing line is myDeque.appendleft('x')

Step-by-step explanation:

There's no such thing as insert or insertleft. There is however append and appendleft. You see how there was a 'x' on the final line and how that 'x' is on the left, its appendleft.

User Bruceceng
by
6.5k points