Skip to content

Commit 74b0146

Browse files
[投稿] 添加脚本: 逐字显示:适合于文字游戏 — by ioo
1 parent 4ce08fc commit 74b0146

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 欢迎使用 PythonIDE!如果觉得好用,请给个好评哦~
2+
import time
3+
def show(text,s=0.1):
4+
for i in list(text):
5+
print(i,end="")
6+
time.sleep(s)
7+
print("")
8+
def text(text):
9+
if text.startswith("/i"):
10+
show(text[2:])
11+
return input()
12+
else:
13+
show(text)
14+
L=["你好","欢迎来到这里","/i你的名字?"]
15+
for k in L:
16+
i=text(k)
17+
print(i if i else "",end="\n" if i else "")

0 commit comments

Comments
 (0)