0
What is the output of this code? Why?
x = 0 if âxâ and True: x = âwrongâ print(x) My choices to answer are: x, 0, wrong, NameError Gives me some different error. Why? Can anyone explain?
2 Answers
+ 4
Additionally to Maninder Singh, the string is wrapped in slanted double quotes, that's a problem too. Just use the regular double quotes.
+ 1
This code has indentation error in 3 line.it should be indent after if statement.