+ 1
Whenever i give else command it shows "SyntaxError: invalid syntax" why?
8 Respostas
+ 3
You have to indent your code like
if True:
print(True)
else:
print(False)
+ 2
code?
+ 1
Num=5
if num >5:
print("true" )
else:
After this it shows erroe
+ 1
But when we want to nest it
+ 1
And thanks
+ 1
Thanks it works
+ 1
Ok thanks
0
When you want to nest, you indent even further.
if True:
print("1st")
if True:
print("2nd")