《python从入门到精通》——使用位移运算符对密码进行加密

效果

在这里插入图片描述

代码

password=int(input())
key=7
print("\n原密码:",password)
password<<=key
print("\n加密后:",password)
password>>=key
print("\n解密后:",password)

原文地址:https://www.cnblogs.com/AlexKing007/p/12339342.html