#coding:utf-8import timeimport datetimewhile True: date_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') time.sleep(1) print("\r北京时间:%s" % date_time,end="")