'''
知识点:
1. /r 表示将光标的位置回退道本行的开头位置
2. print 是一个独立的函数,可以通过修改它的默认值end来让其不换行
3. time.ctime() 显示本地时间(英文)
'''
import time
def Chineseclock():#中文时钟
while True:
now_time = time.localtime()#本地时间(元组类型)
chinese_time = time.strftime('%Y年%m月%d日%H时%M分%S秒', now_time)#格式化本地时间转为中文
print(f"\r现在的时间是:{chinese_time}", end="")
time.sleep(0.1)#0.1秒刷新一次
Chineseclock()#开关
def Englishclock():#英文时钟
while True:
print(f"\r现在的时间是:{time.ctime()}",end="")
time.sleep(0.1)
# Englishclock()#开关