You are viewing a single comment's thread. Return to all comments →
from collections import deque d = deque() for _ in range(int(input())): line = input().split() if len(line)>1: operation, value = line eval(f'd.{operation}({value})') else: eval(f'd.{line[0]}()') print(*d)
Seems like cookies are disabled on this browser, please enable them to open this website
Collections.deque()
You are viewing a single comment's thread. Return to all comments →