🔒 Előnézet mód. Az első tizenöt Foundations lecke ingyenes; ez Pro. Indíts 7 napos trial-t, hogy feloldd a szerkesztőt, az AI tippeket és a tananyag többi részét. Kártya szükséges, bármikor lemondhatod a Dashboard-ban.7 napos trial indítása →
← Kurzusok›Python Foundations›6. modul · Egyidejűség és párhuzamosság›ThreadPoolExecutor — a kimenet előrejelzésepredict139 / 174
+100 XP
Feladat🌐 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.
Találd ki a kimenetet
Olvasd el a kódot figyelmesen
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)