We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
N = int(input())
out = []
for _ in range(N):
parts = input().split()
cmd = parts[0]
args = list(map(int,parts[1:]))
if cmd == 'print':
print(out)
else:
getattr(out,cmd)(*args)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Lists
You are viewing a single comment's thread. Return to all comments →