【发布时间】:2013-12-28 14:30:25
【问题描述】:
我有以下
foo = ['a', 'b', 'c', 'd', 'e']
from random import choice
while True:
print choice(foo)
输出是:
a
c
a
e
...
我希望终端输出覆盖同一行上的旧输出
谢谢
【问题讨论】:
-
我建议不要写退格字符,而是使用 curses 模块。
标签: python list while-loop