Use spaces rather than tabs. (Python interprets a single space as the same level of indentation as a single tab, yet 8 spaces can look the same as 1 tab -- which can lead to some very confusing debugging sessions otherwise.)
If for some reason you need a tab inside a
string, use '\t'. This makes it easy to automatically check for and
complain about tabs in files.
Indent 4 spaces for each successive level of indentation.
Indent nested functions.
Use nested functions only for very minor, short ones.