indentationerror python code example
Example 1: python indentationerror
# usually use 4 spaces to indent (don't mix with TABs or IndentationError)
j = 1
site = 'cg'
while(j<= 1):
if site == 'cg':
print('okay')
else:
print('retry')
j += 1
print ('j: ' + str(j))
print('Done') # okay j: 2 Done
Example 2: indentation error
You've missed tabs or spaces