• + 1 comment
    if __name__ == '__main__':
        N = int(input())
        my_list = []
        for _ in range(N):
            command, *values = input().split()
            params = list(map(int, values))
            if command == "print":
                print(my_list)
            else:
                getattr(my_list, command)(*params)