python - Unexpected indente on line 5? -
i started learning programme python. have tried use if elif , else statement computation kept telling me there indentation error.
i quite confused simple programme. seems when put more 2 lines of code after if statement, there problem. please me this?
thank soooo much
x = raw_input ('give me number ') if x > 100: print 'big' print 'number' print 'hahaha' elif x == 100: print 'yeah' else: print '...'
it likely, have tabs in text.
it recommended set editor not use tabs in python code , possibly convert them spaces before saving.
even without such editor configuration, can fix code searching tabs (you may let show somehow) , replacing spaces.
Comments
Post a Comment