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 Respostas
+ 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.