Question #948

What is the output of the code snippet below?
print(False-True)

When evaluated as part of arithmetical operations, booleans are cast as integers: False as 0 and True as 1 . As such, the result is -1 . (w3schools.com/python/python_booleans.asp)


Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵


Similar questions: