python is bugging

Piet van Oostrum piet-l at vanoostrum.org
Sat Sep 21 17:43:22 EDT 2019


Dave Martin <dschwartz0705 at gmail.com> writes:

> On Saturday, September 21, 2019 at 11:55:29 AM UTC-4, Dave Martin wrote:
>> what does expected an indented block
>
> *what does an indented block mean?

>From the tutorial, https://docs.python.org/3/tutorial/

3.2. First Steps Towards Programming:

The body of the loop is indented: indentation is Python’s way of grouping statements. At the interactive prompt, you have to type a tab or space(s) for each indented line. In practice you will prepare more complicated input for Python with a text editor; all decent text editors have an auto-indent facility. When a compound statement is entered interactively, it must be followed by a blank line to indicate completion (since the parser cannot guess when you have typed the last line). Note that each line within a basic block must be indented by the same amount.

-- 
Piet van Oostrum <piet-l at vanoostrum.org>
WWW: http://piet.vanoostrum.org/
PGP key: [8DAE142BE17999C4]



More information about the Python-list mailing list