Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132923 views
License: OTHER
1
results = []
2
3
for x in data:
4
y = delayed(inc)(x)
5
results.append(y)
6
7
total = delayed(sum)(results)
8
print("Before computing:", total) # Let's see what type of thing total is
9
result = total.compute()
10
print("After computing :", result) # After it's computed
11