📅  最后修改于: 2022-03-11 14:45:34.710000             🧑  作者: Mango
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