Share your repls and programming experiences

← Back to all posts
Better Python3 Interpreter
SvenDeveloper (21)

I saw a repl from someone else who made a python Interpreter. That project is bad, so I made a better one :)

Coder100 (18927)

lol seems like you have some competition! @Andi_Chin


@Andi_Chin it really isn't

Coder100 (18927)

well, he was the creator of the original one so cut him some slack for being salty @IreoluwaRaufu


@Coder100 I guess, yeah

Cashewnoot (2)

this is very beter than the other one!

Foster_Bryant (89)

Although this is better than the other one, both are low effort. So you shouldn't call the other one bad (even though it is lol)

eighty (2)

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 break or 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.


you dont need the exit thing. The user can just type in exit() into the interpriter, and it will work. You could also use a while True loop, and use the break statement in order to exit. You could also do this:

except Exception as e:

That will print the exception onto the screen, and is better than: Syntax Error, as sometimes it wont be Syntax Error all the time

SvenDeveloper (21)

@TaylorLiang I will change it, thanks for your feedback

jawwson (14)

This one still has a lot of problems. It says none after everything I type, and I can't assign variables. Also, why would you use x == 1 when you can just use while True?



if prompt == "exit":
  x = 0

You dont need that, as when they type in exit(), it will automatically terminate the entire program. You also dont need if while x == 1:, as it will also be terminated when exit() is typed in. Because you no longer need x, you can remove x = 1 as a variable

Coder100 (18927)

lol yet the "worse" one has more votes than this one...

while True:
  votes += 1
  competitorVotes -= 1 # if possible
  loop += 1
# IDK how to do synchronous python so this won't be run :P

How about my script? It's called repl python. The project is at

SvenDeveloper (21)

@ganeshaTPC You just start python3 from shell haha

MrMinimax (140)

It would be cool if you did it in something besids python...