Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson7_3
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
3e51d0d5
authored
Jan 23, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
e2adfc9f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
1.py
diy3.py
1.py
0 → 100644
View file @
3e51d0d5
a
=
[
"1"
,
"3"
,
"4"
]
b
=
","
.
join
(
a
)
print
(
b
)
b
.
insert
(
1
,
"2"
)
diy3.py
View file @
3e51d0d5
message
=
"诺依,周末一起去看动漫展吧!"
message
=
input
(
"你要说什么?"
)
# 请使用索引的知识,取出message所有元素(不用遍历的方式)
import
random
length
=
len
(
message
)
key
=
"tuisgsyfsfsufjd9w7ryfhisurfjcieutdsds"
key
=
"欧派洛凯股份撒子程序把你们们不想吃咋说的估计快了老婆婆号东易日盛我去"
noise
=
"@dfgjk法国传统大呼小叫@……&*凡是出版能否保持"
key_message
=
""
for
i
in
message
:
str1
=
i
...
...
@@ -11,4 +11,9 @@ for i in message:
str3
=
random
.
choice
(
key
)
text
=
str1
+
str2
+
str3
key_message
=
key_message
+
text
print
(
key_message
)
\ No newline at end of file
list
=
list
(
key_message
)
len
=
len
(
list
)
random1
=
random
.
randint
(
0
,
len
)
list
.
insert
(
random1
,
noise
)
result
=
""
.
join
(
list
)
print
(
result
)
\ 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