python3 conditional with boolean
a = True # case sensitive, so use True or False
# or
x = 0
a = bool(x) # this is False, any other number is True
# or
x = 'Non-empty string'
a = bool(x) # this is True
if a == True:
print("a is true")
python3 conditional with boolean
a = True # case sensitive, so use True or False
# or
x = 0
a = bool(x) # this is False, any other number is True
# or
x = 'Non-empty string'
a = bool(x) # this is True
if a == True:
print("a is true")
check if boolean is true python
b = True
if b:
print('b is True')
else:
print('b is False')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us