Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Python differs from most other programming languages because it uses whitespace and indentation to determine block structure (that is, to determine what constitutes the body of a loop, the else clause of a conditional, and so on). Most languages use braces of some sort to do this. Here is C code that calculates the factorial of 9, leaving the result in the variable r:
/* This is C code */
int n, r;
n = 9;
r = 1;
while (n > 0) {
r *= n;
n--;
}