cara membuat stopwatch di python
import time
time_to_stop = 10 #seconds
for x in range(1, time_to_stop+1):
print(x)
time.sleep(1)
Depressed Dove
import time
time_to_stop = 10 #seconds
for x in range(1, time_to_stop+1):
print(x)
time.sleep(1)
import time
now = time.time()
future = now + 10
while time.time() < future:
# do stuff
pass