Python Forum
If you deque a list, can it still be indexed?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If you deque a list, can it still be indexed?
#1
I was wondering if when you deque a list, can you still access the middle of the list using the index?

For example :

from collections import deque
q = deque("David", "Sally", "Ralph", "Lisa")

I know I can POPLEFT, POP and append to the list, but am I able to also remove items that are not first or last using indexing?
Reply


Messages In This Thread
If you deque a list, can it still be indexed? - by netrate - Nov-06-2016, 11:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Deque to string in Python 3 anthares 4 4,660 Jun-11-2020, 06:18 AM
Last Post: anthares
  Indexed position editing of a lst ShruthiLS 4 2,531 Sep-26-2019, 09:23 AM
Last Post: perfringo
  Operations on indexed variables in loop Fibulavie 1 1,948 Aug-14-2019, 06:07 AM
Last Post: fishhook

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020