Search
 
SCRIPT & CODE EXAMPLE
 

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

PREVIOUS NEXT
Code Example
Python :: emoji in python 
Python :: dataframe delete row 
Python :: tkinter app icon 
Python :: python open folder in explorer 
Python :: flask debug 
Python :: python check folder exist 
Python :: python stop daemon thread 
Python :: pandas reorder columns 
Python :: boolean python meaning for idiots 
Python :: python remove all except numbers 
Python :: python multiply one column of array by a value 
Python :: python numpy kurtosis 
Python :: print() in python 
Python :: python split string regular expression 
Python :: convert image to matrix python 
Python :: pandas conditional replace values in a series 
Python :: how to swap tuple 
Python :: random list python 
Python :: remove item from list if it exists python 
Python :: python read column data from text file 
Python :: round list of floats python 
Python :: plt.savefig 
Python :: identify the common columns between two dataframes pandas python 
Python :: sort defaultdict by value 
Python :: 2 numbers after comma python 
Python :: remove outliers in dataframe 
Python :: psyche 
Python :: tkinter window background color 
Python :: display Surface quit 
Python :: how to save unzipped files in python 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =