You are viewing a single comment's thread. Return to all comments →
d=deque() for _ in range(int(input())): l= input().split() (getattr(d, l[0])())if len(l)==1 else (getattr(d, l[0])(l[1])) print(' '.join(d))
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Collections.deque()
You are viewing a single comment's thread. Return to all comments →