/* jquery */ /* jquery accordion style*/ /* jquery init */

Raspberry Pi Python: Interactive Mode

Did you know Python has an interactive mode? It is also known as REPL - which stands for Read, Eval, Print and Loop.

Here's why it's a great place to start coding with Python:
   you can be coding in seconds
   type any Python statement and see the results immediately
   Python tells you if there's something it doesn't understand
   it's an interactive way to experiment and gain coding confidence

So, boot up your Raspberry Pi and let's get started.

Python's interactive mode runs in a Linux terminal window. Two simple steps are all that's required:

Open a new terminal window

From the LXDE Desktop menu on your Raspberry Pi and select the 'Other->Terminal' option.

This will open a new terminal window.


Start the Python interpreter

Next to the '$' command prompt type 'python3' and press the 'Enter' key, as below:

$ python3

You'll see a short message about the version of Python 3 (note just type the command 'python' for version 2), and the interactive mode cursor '>>>' will appear.

Now you can type any Python statement and press the 'Enter' key to see the results.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.