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
744fea46
authored
Oct 19, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
54a78f22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
diy3.py
yu.py
diy3.py
View file @
744fea46
message
=
"诺依,周末一起去看动漫展吧!"
g
=
"
%
$&*(#@
%
)"
l
=
list
(
message
)
l
.
insert
(
2
,
g
)
strt
=
""
.
join
(
l
)
print
(
strt
)
message
=
input
(
"你要加密啥?"
)
key
=
"@$E
%
^@RT&^&*()()不吃不喝就是比较合适"
import
random
noise
=
"#$
%
$
%#%
$
%
"
#不能直接往字符插入,转成列表再插
干
=
""
for
i
in
range
(
len
(
message
)):
str1
=
message
[
i
]
str2
=
random
.
choice
(
key
)
str3
=
random
.
choice
(
key
)
str4
=
str1
+
str2
+
str3
干
=
干
+
str4
message1
=
list
(
干
)
b
=
random
.
randint
(
0
,
len
(
message1
))
message1
.
insert
(
b
,
noise
)
message2
=
""
.
join
(
message1
)
print
(
message2
)
yu.py
0 → 100644
View file @
744fea46
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