+ 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
2 Réponses
+ 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 ...
+ 1
you can get indentation error also when you mix spaces and tabulators in your code