indentation in python

Wolfgang Grafen wolfgang.grafen at
Mon Jan 15 07:37:40 EST 2007

Dan Bishop wrote:
> On Jan 13, 8:49 pm, "lee" <libi... at> wrote:
>> Can anyone tell me the basics about indentation in we
>> use it in loops and constructs..etc....
> It's just like indentation in other languages, except that it's
> syntactically required.
The indent rule is minimal:
- indent the following line after a colon (:)
- dedent when you leave that block to the level you wish to continue
- you cannot have an empty block; use pass or None for an otherwise empty block
- as always: have fun!

More information about the Python-list mailing list