dasd
unknown
python
3 years ago
376 B
6
Indexable
import time
# get the start time
st = time.time()
# main program
# find sum to first 1 million numbers
with open ("word.txt") as fin:
for line in fin:
word =line.strip()
print(word)
# wait for 3 seconds
time.sleep(3)
# get the end time
et = time.time()
# get the execution time
elapsed_time = et - st
print('Execution time:', elapsed_time, 'seconds')Editor is loading...