Logical NOT¶
Logical NOT operator (!
) can be used to invert boolean or truthy value. This always returns a boolean value.
Syntax
!operand1
Example
!true
# false
!false
# true
!someBooleanValue
!someValue
!!someValue