🔒 Tryb podglądu. Pierwszych piętnaście lekcji Foundations jest darmowych; ta jest Pro. Rozpocznij 7-dniowy trial, aby odblokować edytor, podpowiedzi AI i resztę kursu. Wymagana karta, anulujesz w dowolnym momencie w Dashboard.Rozpocznij 7-dniowy trial →
📝 **Task:** Predict what the code prints. Hint: pool.map keeps input order.
📋 Edit the starter code below. Tests run automatically.
💡 **Hint:** Re-read the theory if you get stuck.
Przewiduj wynik
Przeczytaj kod uważnie
from concurrent.futures import ThreadPoolExecutor
def double(x):
return x * 2
with ThreadPoolExecutor(max_workers=2) as pool:
results = list(pool.map(double, [1, 2, 3]))
print(results)