Commit d10cfb4e by BellCodeEditor

save project

parent 471b8360
Showing with 11 additions and 8 deletions
import random
list = ['a','b','c','d']
key = '信息加密好酷呀!'
str = random.choice(key)
print(str)
\ No newline at end of file
s = ''.join(list)
print(s)
\ No newline at end of file
......@@ -3,11 +3,15 @@ key = 'qwerty去啊自我实现二的,吃软饭v提供必要黑奴加密!'
key_message = ''
# 请对message进行遍历,取出所有元素
import random
noise = 'port:@#$%^&'
for i in message:
str1 = i
str2 = random.choice(key)
str3 = random.choice(key)
t = str1+str2+str3
key_message += t
print(key_message)
\ No newline at end of file
list_message = list(key_message)
list_message.insert(5,noise)
m_message = ''.join(list_message)
print(m_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