+ 3

What is indentation error and why is Yes as No in blue colour in python

when I write print("Yes") it comes in blue colour and ("No") also comes in blue colour and when we want the output it comes indentation error what should I do? I am confused

1st Jan 2018, 1:34 PM
Omkar
2 Answers
+ 17
Yes and No are strings and your compiler probably paints them blue for you to distinguish them from other types. Indentation error means that you did something like : if ... : print... else... instead of : if ... : print... else ...
1st Jan 2018, 1:42 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
you can get indentation error also when you mix spaces and tabulators in your code
1st Jan 2018, 4:11 PM
michal