You are viewing a single comment's thread. Return to all comments →
tl;dr ;) Two-liner:
l=[] [getattr(l,s[0])(*map(int,s[1:])) if hasattr(l,s[0]) else print(l) for s in [input().split() for _ in range(int(input()))]]
Seems like cookies are disabled on this browser, please enable them to open this website
Equal
You are viewing a single comment's thread. Return to all comments →
tl;dr ;) Two-liner: