Question #147

What it the output of the code snippet below?
print(float(True))

The float() function casts True to 1.0 and False to 0.0 . (docs.python.org/3/library/functions.html#float)


Comment on Disqus:

Comment on Twitter:

Question difficulty: 🔵🔵🔵🔵🔵


Similar questions: