Commit e4f51685 by BellCodeEditor

auto save

parent 559fef77
Showing with 16 additions and 3 deletions
message = "诺依,周末一起去看动漫展吧!" import random #导入随机数模块
key = '说是打卡机的卡号是的' #加密密钥
message = '锦隆,周末出去玩!' #被加密的数据
tak='' #创建空字符串
for i in message:
p2=random.choice(key)
p3=random.choice(key)
tak=tak+i+p2+p3 #拼接字符串
print(tak) #一次加密后的数据
a=list(tak) #将字符串转化为列表
a.insert(random.randint(0,len(a)),'123eS!@!@!42') #列表的随机索引位置添加元素
a=''.join(a)#将列表转化成字符串,用''链接
print(a) #输出二次加密后的数据
# 请使用索引的知识,取出message所有元素(不用遍历的方式)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment