import time while True: localtime = time.localtime() result = time.strftime("%H:%M:%S", localtime) print(result) time.sleep(1)