Python Complement Operator

Description

Python Program to illustrate complement operator

Solution

num=int(input("Enter your Number:"))
print("After Complement: {}".format(~num))

Explanation

1 complement = 0
0 complement = 1