I saw a repl from someone else who made a python Interpreter. That project is bad, so I made a better one :)
You could make it slightly shorter by getting rid of that
x variable. Make the
while loop into a
while True: and replace
x = 0 with either
quit(). In fact, you could get rid of that "exit" check altogether, as simply typing Python's built-in
quit() function would have the same effect.