File "python", line 2
brian = "Hello life!"
IndentationError: unexpected indent

I dont know whats wrong with my indentation.(i've set it to 4 spaces)

# Set the variable brian on line 3
    brian = "Hello life!"


why did you set the indent to 4 spaces? I don't see a reason you should do this, the indent should be zero spaces


Thanks...on my first code i saw indentation error. then i set it to 4 spaces... I've seen the error


indention is used to distinguish if clauses and so on:

test1 = "hello"
if True:
   test2 = "world"

now test2 is declared inside the if clause. test1 can't be indented, since it is part of an if clause (or anything else that requires indention)


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.