Hi,
I need a buffer for appending/popping dictionaries as a buffer. I used a list, which was working fine but read that a list is not efficient. So I looked into deque.
mq = deque()
mq.append ({'1':'a','2':'b','3':'c'})
which is working, popleft() returns a dictionary.
But is this legal for deque, adding dicts?
Is there an option to add 2 dictionaries when initialising deque?
mq = deque({'1':'a','2':'b','3':'c'}, {'1':'a','2':'b','3':'c'})
mq = deque([{'1':'a','2':'b','3':'c'}, {'1':'a','2':'b','3':'c'}])
Do not work.
Best regards,
Mart