Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / lesson7_3

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • lesson7_3
  • diy3.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · 6d6455f5
    BellCodeEditor committed 2 years ago
    6d6455f5
diy3.py 428 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import random
key="abcdefgh"
assd="fhefuhdfejkdvjwefhwefuhrfefuir4ui9sdv9yh"
# 请使用索引的知识,取出message所有元素(不用遍历的方式)
message="诺依,周末一起去看动漫展吧"
key_message=""
for i in range(len(message)):
    a=message[i]
    b=random.choice(key)
    c=random.choice(key)
    d=a+b+c
    key_message+=d
list1=list(key_message)
list1.insert(6,assd)
str4="".join(list1)
print(str4)