reverse hat geschrieben:
I read the tutorials and indentation and still helpless.
I just can`t find any logic, that would define the set of rules, since python dont use symbols like (){}[] for beginning and the ending of certain function, how will I know when and which line of code should appear on the right indentation.
Did you never indent code in other languages?

If you did, just indent code the same way you did in other languages, but leave the symbols. Then you have it...
If you have never indented code before, than python isn't probably the right language for you

Anyway, you start a new indented block in python, where you would place an open curly brace in C. You stop indenting code at that point, where you place a closing curly brace in C.
Code: Alles auswählen
function hello( void )
{ // in python you would start indenting here
printf('Hello world')
} // in python you would stop indenting here
hello()
The same in python:
Code: Alles auswählen
def hello(): # same as function hello( void ) in c
# start indenting here (with 4 spaces)
print 'hello world'
# stop indenting here.
# Code outside the function (behind the curly brace in C) is not indented
hello()
reverse hat geschrieben:if not I would appericiate a lot , if any one of you would upload a py file so that I can look and learn...please!
You could also take a look at the source of python itself...
hope it helps
lunar