擅长:python、mysql、java
<p>在repl.it中尝试过,这对我有效…(添加逗号now.strftime)</p>
<pre><code>import time
from datetime import datetime
while True:
now = datetime.now()
print (now.strftime("%m/%d/%Y %H:%M:%S"), end="", flush=True),
print("\r", end="", flush=True),
time.sleep(1)
</code></pre>