You are viewing a single comment's thread. Return to all comments →
from collections import deque d = deque() n = int(input()) for i in range(n): command, *number = input().split() if number: number = int(number[0]) getattr(d, command)(number) else: getattr(d, command)() 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 →