【发布时间】:2022-12-14 10:05:56
【问题描述】:
我运行了一个无限循环,它在控制台中不断打印几乎相同的内容。为了可读性,如果它与上一个循环的内容相同,我不希望 python 打印到下一行
while True:
print("The same line again. Lets overwrite")
if random.randint(1, 1000) == 999:
print("It is a different line. I do not want to overwrite")
【问题讨论】: