【发布时间】:2020-10-27 11:05:51
【问题描述】:
我的代码似乎在代码末尾打印了None。我读到这是由于几个打印语句,但我不确定如何在我的情况下解决它:
def type(str):
for char in str:
sys.stdout.write(char)
sys.stdout.flush()
time.sleep(0.075)
time.sleep(1.5)
input1 = input(type("""\na. You go to the printer
b. Go to keyboard"""))
输出:
a. You go to the printer
b. Go to keyboardNone
最后如何去掉多余的None?
【问题讨论】:
标签: python python-3.x