Computer Science

What is the output produced by following code?

a, b = bool(0), bool(0.0)
c, d = str(0), str(0.0) 
print (len(a), len(b)) 
print (len(c), len(d))

Python

Python Data Handling

29 Likes

Answer

The above code will give an error as the line print (len(a), len(b)) is calling len function with bool arguments which is not allowed in Python.

Answered By

16 Likes


Related Questions