Decode School

Decode School - The School for Problem Solvers

Welcome to my blog. Subscribe and get my latest blog post in your inbox.

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