Commit 84d0526b by BellCodeEditor

save project

parent 9f42ea31
Showing with 8 additions and 5 deletions
import random
message = "SBSB"
key = "WCWCWCWCWCWCWCWC"
message = "SBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSBSB"
key = "qwertyuiopasdfghjklzxcvbnm"
key1="asfuiaehiuhsdoguiesfguies"
key_message=""
for i in message:
s1=i
......@@ -8,5 +9,7 @@ for i in message:
s3=random.choice(key)
s4=s1 + s2 + s3
key_message +=s4
print(key_message)
# 请使用索引的知识,取出message所有元素(不用遍历的方式)
\ No newline at end of file
list1 = list(key_message)
list1.insert(random.randint(0,len(list1)),key1)
list2="".join(list1)
print(list2)
\ 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