diy2.py
577 Bytes
message = "Happy mother`s Day,mam."
import random
key="你干嘛你喊嘛看开点看到"
key2 ="kgkfkfkfkfkfkfkfkfkfkfkfkfkfkkccfkfkflfkffkfkfkfkffkfkfkfkfkfkfkkfkfk"
# 请对message进行遍历,取出所有元素
m = ""
for i in message:
str1 = i
str2 = random.choice(key)
str3 = random.choice(key)
str4 = random.choice(key)
str5 = random.choice(key)
str6 = random.choice(key)
text = str1+str2+str3+str4+str5+str6
m = m+ text
listm = list(m)
index = random.randint(0,len(listm))
listm.insert(index,key2)
m = "".join(listm)
print(m)