You are viewing a single comment's thread. Return to all comments →
from collections import deque d= deque() N = int(input()) for inp in range(N): operation = input().split() if len(operation) == 1: getattr(d, operation[0])() else: getattr(d, operation[0])(operation[1]) print(" ".join(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 →