Coding_tuts

Python count seconds

Python count seconds

import time

counter = 0

while 0 < 1:

    seconds = time.time()

    local_time = time.ctime(seconds)

    counter = counter +1

    print('Seconds: ' , counter)

    time.sleep(1)

How do you rate this article?

0



Coding_tuts
Coding_tuts

Programming tutorials

Publish0x Publish0x

Reward the author with $0.01 in crypto, and earn yourself as you read!

20% to author / 80% to me.
Rewards are FREE. Publish0x pays them, not you.

Page not displaying correctly?