Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python auto updating clock

# 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()
Comment

PREVIOUS NEXT
Code Example
Python :: how to install python 2 
Python :: Python pandas drop any row 
Python :: pandas to pickle 
Python :: python get files in directory 
Python :: get max value column pandas 
Python :: position of legend matplotlib 
Python :: creata daframe python 
Python :: trimming spaces in string python 
Python :: python wikipedia api search 
Python :: python inspect source code 
Python :: iterar una lista en python 
Python :: mark_safe django 
Python :: python range backward 
Python :: python datetime with timezone 
Python :: pipenv 
Python :: selenium scroll down python 
Python :: how to get a row from a dataframe in python 
Python :: how to print variables in a string python 
Python :: pandas order by date column 
Python :: argparse list 
Python :: python get angle between two points 
Python :: generate random list of number py 
Python :: what is a cube minus b cube 
Python :: how to input 2-d array in python 
Python :: django static url 
Python :: python telegram bot send image 
Python :: python yaml load_all 
Python :: fuzzy lookup in python 
Python :: tkinter how to connect keyboard key to button 
Python :: pretty json python 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =