How to create deque with a list in python

1 Answer

0 votes
from collections import deque

lst = [1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 255] 

items = deque(lst)

print(items)

     
    
'''
run:
  
deque([1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 255])
    
'''

 



answered Mar 3, 2020 by avibootz

Related questions

2 answers 297 views
2 answers 175 views
1 answer 476 views
476 views asked Mar 3, 2020 by avibootz
1 answer 170 views
...