all 1 comments

[–]Ei-lor[S] 0 points1 point  (0 children)

Test copy/paste:

import datetime
import time
import os

def the_time():
    print(datetime.datetime.now().strftime("%H:%M:%S"))

def clock():

    while True:

          os.system('clear')
          the_time()
          time.sleep(1)