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