What a typical interpreter looks like
A textbook interpreter would look like the following:
def execute(cmd_seq, stack):
cmd = cmd_seq[0]
if isinstance(cmd, int):
stack.insert(0, cmd)
cmd_seq.pop(0)
elif cmd in 'add sub'.split():
if not len(stack) >= 2:
raise Irreducible
n1 = stack.pop(0)
if not isinstance(n1, int):
raise Irreducible
n2 = stack.pop(0)
ans = int(operator.__dict__[cmd](n2, n1))