Ask Your Question

Revision history [back]

Hello,

Python is very strict about indentation (but not about whether you should use space or tab though)

This is good

x = 3
def my_function():
    s = "my x is %s" % x
    print s

These are bad

x = 3
  def my_function():
    s = "my x is %s" % x
    print s

(the f is indented but should not)

x = 3
def my_function():
      s = "my x is %s" % x
    print s

(the indentations are different in the two lines)

Vincent