Preskoči na glavni sadržaj
🔒 Način pregleda. Prvih petnaest Foundations lekcija je besplatno; ova je Pro. Pokrenite 7-dnevni trial da otključate editor, AI savjete i ostatak programa. Kartica obavezna, otkažite bilo kada u Dashboard.Pokreni 7-dnevni trial →
⚡
← Kolegiji›Python FoundationsModul 6 · Konkurencija i paralelizam›ThreadPoolExecutor — predviđanje izlazapredict139 / 174
+100 XP
Zadatak🌐 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.
Predvidi izlaz

Pažljivo pročitaj kod

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)

Što će program ispisati? Napiši ovdje: