What will be the output produced by the following code statements? (a) bool(0) (b) bool (1) (c) bool('0’) (d) bool('1’)
Answers
Answered by
1
Answer:
Option b is the correct answer
Answered by
6
Explanation:
bool(0) : False because 0 refers to False
(ii) bool(str(0)) : True because ‘0’ is different than 0 and refers to something that is True
Similar questions