bool(x) bool python code example
Example 1: and bool python
i = 5
ii = 10
if i == 5 and ii == 10:
print "i is 5 and ii is 10"
Example 2: python bool()
# Returns the boolean value of the specified object
x = bool(1) # outputs True
i = 5
ii = 10
if i == 5 and ii == 10:
print "i is 5 and ii is 10"
# Returns the boolean value of the specified object
x = bool(1) # outputs True