What is indentationError and white spaces and where should i be careful?


#1



Replace this line with your code.


#2

Things to Remember:

if condition: #code after must be indented by four spaces
    #indented code

else: #code must also be indented by four spaces
    #indented code

def(): #code must also be indented by four spaces
    #indented code

Same goes for Class, for, and while basically anything after a colon in python must be indented. :grin:


#3

Ok, i got it now ,after colon we should give 4 spaces . Thank you


#4

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