• + 2 comments

    @wittrup, Great piece of code bro :)

    For newbie like me, below is the breakdown of the code.

    l=[]
    for x in range(int(input())):
    	s = input().split()
    	if hasattr(l,s[0]):
    		getattr(l,s[0]) (*map(int,s[1:]))
    	else:
    		print (l)