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 404 views
2 answers 277 views
1 answer 544 views
544 views asked Mar 3, 2020 by avibootz
1 answer 267 views
...