An interpreter of your own

: the Redis build turns a stream of raw bytes into a command the server understands. This lesson does the same job for program text: it turns characters into a shape the computer can act on.
You type 2 + 3 * 4 and a program must answer 14. It must not answer 20. Nobody told that program that multiplication goes first. Somebody wrote code that works it out from the characters. This is the problem: text is only a row of characters, and a row of characters does not run.
The history (optional)
John McCarthy described Lisp in a paper in Communications of the ACM, April 1960. The paper defines a function called eval that takes an expression and works out its value. McCarthy wrote that S. R. Russell noticed eval could serve as an interpreter for Lisp, and promptly hand coded it. Steve Russell did this for the IBM 704. Before that, work on the language had focused on compiling it. Nothing later in this lesson depends on this story.
By the end of this lesson you will be able to write a small language of your own, with variables, loops and functions, in about 150 lines of Python, and run real programs in it.
Before you start. Redis 02: RESP, The Wire Protocol showed how a server reads raw bytes and finds the command inside them: the same job, smaller. How Code Becomes Execution (compilers, stack & heap) said a compiler turns your words into chip instructions, and that some languages instead use a program that reads the words and acts on them directly. That second kind is what you build here. You need Python 3 to run the code. Reading it needs nothing.