By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,089 Members | 2,260 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,089 IT Pros & Developers. It's quick & easy.

indentation in python

P: n/a
lee
Can anyone tell me the basics about indentation in python......how we
use it in loops and constructs..etc....

Jan 14 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
lee wrote:
Can anyone tell me the basics about indentation in python......how we
use it in loops and constructs..etc....
http://docs.python.org/tut/node5.htm...00000000000000

Jan 14 '07 #2

P: n/a
On Jan 13, 8:49 pm, "lee" <libi...@gmail.comwrote:
Can anyone tell me the basics about indentation in python......how we
use it in loops and constructs..etc....
It's just like indentation in other languages, except that it's
syntactically required.

Jan 14 '07 #3

P: n/a
Dan Bishop wrote:
On Jan 13, 8:49 pm, "lee" <libi...@gmail.comwrote:
>Can anyone tell me the basics about indentation in python......how 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!
Jan 15 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.