Decode School

Decode School - The School for Problem Solvers
Welcome to My Blog.
Need Assignment / Project Guidance (or) Training in Python?

Python Complement Operator

Python Program to illustrate complement operator

Program or Solution

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

					    
					

Program Explanation

1 complement = 0 0 complement = 1