Python-100-Days/Day01-15/code/Day13/multiprocess4.py

16 lines
299 B
Python

from time import time
def main():
total = 0
number_list = [x for x in range(1, 100000001)]
start = time()
for number in number_list:
total += number
print(total)
end = time()
print('Execution time: %.3fs' % (end - start))
if __name__ == '__main__':
main()