QUESTION IMAGE
Question
a list cannot use appendleft but a ____ can. deque string sequence collection
Brief Explanations
In Python, lists do not have an appendleft method. However, deques (double - ended queues) from the collections module have an appendleft method which allows adding elements to the left side of the data structure. Strings are immutable sequences and do not support such operations. Sequences and collections are more general terms and do not inherently have an appendleft method like deques do.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
A. deque