You are viewing a single comment's thread. Return to all comments →
if __name__ == '__main__': N = int(input()) lst = [] inputs = [ [line[0], *map(int,line[1:])] for line in (input().split() for _ in range(N)) ] for command_input in inputs: try: getattr(lst, command_input[0])(*command_input[1:]) except AttributeError: getattr(__builtins__, command_input[0])(*[lst,*command_input[1:]])
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 →