Commit 84d0526b by BellCodeEditor

save project

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