Commit 9b31e962 by BellCodeEditor

auto save

parent 47e4eae5
Showing with 38 additions and 8 deletions
# message = "诺依,周末一起去看动漫展吧!"
# # 请使用索引的知识,取出message所有元素(不用遍历的方式)
# length = len(message)
# i = 0
# while i < length:
# element = message[i]
# print(element)
# i += 1
import random
message = "诺依,周末一起去看动漫展吧!" message = "诺依,周末一起去看动漫展吧!"
key = input('请输入要加密的文字:')
a=''
for i in key:
str1 = i
str2 = random.choice(message)
str3 = random.choice(message)
text = str1+str2+str3
a = a+text
print(a)
# import random
num = random.randint(0,len(a))
b=list(a)
b.insert(num,'port:@#$%^&')
c=''.join(b)
print(c)
# 请使用索引的知识,取出message所有元素(不用遍历的方式)
length = len(message)
i = 0
while i < length:
element = message[i]
print(element)
i += 1
\ 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