Naar hoofdinhoud
🔒 Voorbeeldmodus. De eerste vijftien Foundations-lessen zijn gratis; deze is Pro. Start een 7-daagse trial om de editor, AI-hints en de rest van het curriculum te ontgrendelen. Kaart vereist, op elk moment opzegbaar in Dashboard.Start 7-daagse trial →
← CursussenPython FoundationsModule 6 · Gelijktijdigheid en parallellismeThreadPoolExecutor — voorspel de uitvoerpredict139 / 174
+100 XP
Opdracht🌐 shown in EN
📝 **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.
Voorspel uitvoer

Lees de code zorgvuldig

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)

Wat zal het programma uitprinten? Schrijf hier: