CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
jackfrued

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: jackfrued/Python-100-Days
Path: blob/master/Day01-15/code/Day13/multiprocess4.py
Views: 729
1
from time import time
2
3
4
def main():
5
total = 0
6
number_list = [x for x in range(1, 100000001)]
7
start = time()
8
for number in number_list:
9
total += number
10
print(total)
11
end = time()
12
print('Execution time: %.3fs' % (end - start))
13
14
15
if __name__ == '__main__':
16
main()
17