S
S
slarp2020-06-03 11:17:46
Python
slarp, 2020-06-03 11:17:46

How to implement a simple stopwatch?

It is necessary to do something like a loop after the launch of which one value would be added to the second variable.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-06-03
@slarp

import time
sec = 0
while True:
    print(sec)
    time.sleep(1)
    sec += 1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question