Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson7_2
This project
Loading...
Sign in
Toggle navigation
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
Commit
7e9498d7
authored
Jul 24, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
3534ef03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
diy10.py
diy10.py
View file @
7e9498d7
message
=
"诺依,周末一起去看动漫展吧!"
import
random
message
=
"杨霈宸,7月23日日本奥运会开始了!"
key1
=
"afs华东交¥
%*
大)*&登记表bko250呵呵呵飞虎队GVvrdr;nnd那当然4bvc看不上5418h729502gfksv3和教师345节活动92v:JJ273#¥
%
……3疔的巨峰寺北京现代"
text
=
""
key2
=
"www.//@^_^魏晋649¥
%
……&*风度&$
%
"
# 请对message进行遍历,取出所有元素
for
i
in
message
:
print
(
i
,
""
)
start1
=
random
.
choice
(
key1
)
start2
=
random
.
choice
(
key1
)
start3
=
random
.
choice
(
key1
)
text
=
text
+
i
+
start1
+
start2
+
start3
l_text
=
list
(
text
)
l_text
.
insert
(
random
.
randint
(
0
,
len
(
message
)
-
1
),
key2
)
mx
=
""
.
join
(
l_text
)
print
(
mx
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment