#python #Boolean #pythoncourse
converts the given value to a boolean value ( True or False ).
bool function in the python
Boolean
1)
• Boolean in python | python tutorials | Bes...
Facebook link:
/ 976594952928573
empty list
mylist = []
print(mylist,'is',bool(mylist))
empty tuple
t = ()
print(t,'is',bool(t))
zero complex number
a = 0 + 0j
print(a,'is',bool(a))
num = 55
print(num, 'is', bool(num))
val = None
print(val,'is',bool(val))
val = True
print(val,'is',bool(val))
empty string
str = ''
print(str,'is',bool(str))
str = 'Hello'
print(str,'is',bool(str))
On this page of the site you can watch the video online converts the given value to a Boolean value ( True or False ). | python bool function| python course with a duration of hours minute second in good quality, which was uploaded by the user thepycode 08 December 2021, share the link with friends and acquaintances, this video has already been watched 377 times on youtube and it was liked by 50 viewers. Enjoy your viewing!