A Matter of interpretation , indentations


So i am confused about indentation, prior to A Matter of interpretation it says there should be 2 spaces as indentation. But At A Matter of interpretation the following code cam up as an error
1 spam = True
2 eggs = False

But when i did no identation it worked, like this
1 spam = True
2eggs = False

Is this a bug or am i just not understanding indentation?

Thanks for any help


indention determines nesting in python, which code belongs to an if clause for example:

if condition:
    print "i am inside the if clause"

print "i am outside the else clause"

if you just declare two variable they don’t need indent. Unless you declare the variable inside the if clause, function or other things which require indent


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