Прескочи на главни садржај
🔒 Режим прегледа. Првих петнаест Foundations лекција је бесплатно; ова је Pro. Покрените 7-дневни trial да откључате едитор, AI савете и остатак курса. Картица је обавезна, можете отказати у било ком тренутку у Dashboard.Покрени 7-дневни trial →
⚡
← Kursevi›Python FoundationsМодул 6 · Конкурентност и паралелизам›ТхреадПоолЕкецутор — предвиди излазpredict139 / 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)

Šta će program ispisati? Napiši ovde: