What is wrong? PYTHON | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What is wrong? PYTHON

what is wrong with this? if (blah = nah): print ("lol") else: print ("ace")

6th Jun 2018, 5:34 PM
Snowflake C
Snowflake C - avatar
3 Answers
+ 13
= isn't a conditional operator. The correct code is : if blah == nah : print ("lol") else : print ("ace") Check this Snow C : https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2280/
6th Jun 2018, 5:46 PM
***
+ 4
you shouldn't use () in if and dont use = it's not conditional operator it should be if blah==nah: print("lol")
6th Jun 2018, 5:35 PM
Owenizedd
Owenizedd - avatar
+ 4
and you should use proper indentation
6th Jun 2018, 5:37 PM
Max
Max - avatar