1.7 - Using the REPL
Python has a built in program called the REPL. You can type in code and it will execute immediately. It's useful for quickly testing things, or using as a calculator!
REPL stands for Read, Evaluate, Print, Loop. This means that it will read your input, evaluate the code, print the output, and then loop.
You can access it by typing python
into your computer's terminal. IDLE also has the REPL open by default. The REPL shows a >>>
where you type your code in.
Try typing print("Hello!")
then pressing enter. Your code will get executed immediatley after. We've also included some math to demonstrate the calculation ability.
>>> print("Hello!")
Hello!
>>> 6+6
12
>>>
There was meant to be an ad here. Support us by turning off your ad blocker or donating.