我知道如何使用time.sleep(),但我很好奇如何打印这样的东西:
"hey...(pause)...you...(pause)....there"其中的“暂停”是一些time.sleep()间隔。我只能在不同的行上打印这些间隔。有什么办法让这一切都在同一条线上吗?
发布于 2013-12-18 06:37:46
在python 2中:
print "hey...",
time.sleep(0.5)在python 3中:
print("hey...", end=' ')
time.sleep(0.5)https://stackoverflow.com/questions/20651184
复制相似问题