Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

clock in python

# Here is a self updating clock function, just run it and it'll self update itself until you hit CTRL-C
import datetime
import time
def clock():
    while True:
        print(datetime.datetime.now().strftime("%H:%M:%S"), end="
")
        time.sleep(1)

clock()
Source by www.quora.com #
 
PREVIOUS NEXT
Tagged: #clock #python
ADD COMMENT
Topic
Name
8+1 =