[Tutor] Two subsequent for loops in one function - I got it!

Steven D'Aprano steve at pearwood.info
Sun Nov 24 01:35:29 CET 2013


On Sat, Nov 23, 2013 at 09:54:38PM +0100, Rafael Knuth wrote:
> > See? It has no output. By the way, the python REPL is your friend! 
> > Use it often when you can't figure out what is happening.
> 
> Oh, I didn't even know that such a thing exists :-) Cool!
> Unfortunately, I only found Python REPLs for version 2.7.2 or lower.
> Is there a REPL for 3.3.0 ..?

Every version of Python has a REPL, also known as the interactive shell 
or interactive interpreter. That includes Jython and IronPython, and I 
presume others such as PyPy (which I have not used).

If you launch Python from your operating system's command line with no 
arguments, like this:

python

or give the version number:

python3.3

it will launch the interactive interpreter. Depending on your operating 
system, you may need to provide the full path to the executable.

You might also like to investigate IPython and bpython, which are 
enhanced REPLs. IPython adds shell-like features and a Mathematica-like 
interface, and is mostly aimed at the scientific community. bpython adds 
colour and other goodies.


-- 
Steven



More information about the Tutor mailing list