Sari la conținutul principal
🔒 Mod previzualizare. Primele cincisprezece lecții Foundations sunt gratuite; aceasta este Pro. Pornește un trial de 7 zile pentru a debloca editorul, sugestiile AI și restul programului. Card necesar, anulează oricând în Dashboard.Pornește trial de 7 zile →
← CursuriPython FoundationsModulul 8 · Python modern și capstonepathlib — gestionarea modernă a căilorpredict163 / 174
+100 XP
Sarcină🌐 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.
Prezice ieșirea

Citește codul cu atenție

from pathlib import Path

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

Ce va afișa programul? Scrie aici: