Python‎ > ‎decimal‎ > ‎

Decimal.logical_invert()


Introduction
Return the digit-wise inversion of the (logical) operand.

Syntax
Decimal(x).logical_invert()

Parameters
x=digital( 0 or 1)

Examples
>>> Decimal('1').logical_invert()
Decimal('1111111111111111111111111110')
>>> 

>>> Decimal('0').logical_invert()
Decimal('1111111111111111111111111111')

Comments