Answers for "negation of boolean in pyhton"

0

negation of boolean in pyhton

# The negation of a boolean is the opposite of its current value
x = True
print (x) # output True
x = not x
print (x) # output # False
Posted by: Guest on February-06-2021
0

negation of boolean in pyhton

# Return opposite of boolean
bool_value = True
print (bool_value) # True
bool_value = not bool_value
print (bool_value) # False
Posted by: Guest on February-06-2021

Python Answers by Framework

Browse Popular Code Answers by Language