【发布时间】:2020-07-01 05:48:54
【问题描述】:
所以我绝对知道这样说:
x = input(print('hello what is ur name uwu:')
会产生:
hello what is ur name uwu:None
但这是我的代码:
import sys
import time
from colorama import Fore
def crawl(text,ti):
for char in text:
sys.stdout.write(char)
sys.stdout.flush()
time.sleep(ti)
input(crawl(Fore.RED + 'Well, hello there my dear player!',0.1))
正如预期的那样......它产生了:
Well, hello there my dear player!None
我试过这样做:
crawl(input(Fore.RED + 'Well, hello there my dear player!'),0.1)
它产生正确但有一个问题......它会立即产生它,我的抓取功能应该一个字母一个字母地把它拖出来。请帮忙。
【问题讨论】:
-
如何将
crawl(...)和input()分开行。 -
什么意思
-
我在回答时描述过
-
这能回答你的问题吗? Random None when printing from raw_input
标签: python function input printing