dasd

mail@pastecode.io avatar
unknown
python
2 years ago
376 B
2
Indexable
Never
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')