Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Recolic
chinese-obfs
Commits
3df9eef6
Commit
3df9eef6
authored
Oct 31, 2019
by
bilibili
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用random.choice简化代码
parent
f5f6dc3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
自动狗屁不通文章生成器.py
自动狗屁不通文章生成器.py
+4
-4
No files found.
自动狗屁不通文章生成器.py
View file @
3df9eef6
...
...
@@ -175,9 +175,9 @@ xx = "学生会退会"
]
def
来点名人名言
():
xx
=
名人名言
[
random
.
randint
(
0
,
len
(
名人名言
)
-
1
)]
xx
=
xx
.
replace
(
"a"
,
前面垫话
[
random
.
randint
(
0
,
len
(
前面垫话
)
-
1
)]
)
xx
=
xx
.
replace
(
"b"
,
后面垫话
[
random
.
randint
(
0
,
len
(
后面垫话
)
-
1
)]
)
xx
=
random
.
choice
(
名人名言
)
xx
=
xx
.
replace
(
"a"
,
random
.
choice
(
前面垫话
))
xx
=
xx
.
replace
(
"b"
,
random
.
choice
(
后面垫话
))
return
xx
def
另起一段
():
...
...
@@ -196,6 +196,6 @@ for x in xx:
elif
分支
<
20
:
tmp
+=
来点名人名言
()
else
:
tmp
+=
废话
[
random
.
randint
(
0
,
len
(
废话
)
-
1
)]
tmp
+=
random
.
choice
(
废话
)
tmp
=
tmp
.
replace
(
"x"
,
xx
)
print
(
tmp
)
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