你需要使用stdout.flush().这会强制它在每次打印后显示出来.
stdout.flush()
import sys A = "Random sentence" for x in A: time.sleep(random.randint(1,4)) print(x, end='') sys.stdout.flush()