1
我试图做的是Python动画文本funtion只工作了某些字符串
import sys
def anitext(str):
for char in str:
sys.stdout.write(char)
time.sleep(textspeed)
print ("")
此功能工作的字符串,例如
anitext ("String")
显示动画文字一项功能,唯一的变量如
name = ("Stack")
anitext (name)
但是对输入语句或联合语句不起作用
anitext (name, "This is a string")
有没有什么办法让这个“Anitext”函数能够处理不仅仅是普通字符串的语句?
- 奥利Ë