Ugrás a fő tartalomra
🔒 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 →
← KurzusokPython Foundations8. modul · Modern Python és zárókőpathlib — modern útvonalkezeléspredict163 / 174
+100 XP
Feladat🌐 shown in EN
📝 **Question:** Predict the two lines printed. \`.name\` returns the final segment ("today.log"); \`.suffix\` returns the extension with the dot. 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.
Találd ki a kimenetet

Olvasd el a kódot figyelmesen

from pathlib import Path

p = Path("data") / "logs" / "today.log"
print(p.name)
print(p.suffix)

Mit ír ki a program? Írd ide: