Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to maker loops coun t in second in pytho

import time #import the necessary library

sec = 0 #define the varieble that will store the amount of seconds

while True:
    print(sec) #prints the seconds
    time.sleep(1) #time.sleep(amount of seconds) the delay
    sec = sec + 1 # adds the time passed to the counter
Comment

PREVIOUS NEXT
Code Example
Python :: web3py to wei 
Python :: xgboost feature importance 
Python :: how to create chess board numpy 
Python :: python code to drop columns from dataframe 
Python :: python remove read only file 
Python :: como eliminar palabras repetidos de una lista python 
Python :: drop columns pandas 
Python :: for e in p.event.get(): pygame.error: video system not initialized 
Python :: python r squared 
Python :: module pygame has no member 
Python :: select python version ubuntu 
Python :: python randomized selection 
Python :: python year month day hour minute second 
Python :: xpath beautifulsoup 
Python :: python display object attributes 
Python :: E: Unable to locate package python3-pip docker file 
Python :: list all files of a directory in Python 
Python :: pandas drop values from column 
Python :: use python3 as default mac 
Python :: sort list by attribute python 
Python :: json not readable python 
Python :: how to count down in python using turtle graphics 
Python :: pandas groupby count unique rows 
Python :: python parse args 
Python :: try datetime python 
Python :: pandas series draw distribution 
Python :: pyspark import stringtype 
Python :: djangodebug toolbar not showing 
Python :: p-norm of a vector python 
Python :: rotate xticks matplotlib 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =