๐ Modalitร anteprima. Le prime quindici lezioni di Foundations sono gratuite; questa รจ Pro. Avvia un trial di 7 giorni per sbloccare l'editor, i suggerimenti AI e il resto del programma. Carta richiesta, disdici in qualsiasi momento dalla Dashboard.Avvia trial di 7 giorni โ
โ CorsiโบPython FoundationsโบModulo 8 ยท Python moderno e capstoneโบpathlib: gestione moderna dei percorsipredict163 / 174
+100 XP
Compito๐ 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.
Predici output
Leggi il codice attentamente
from pathlib import Path
p = Path("data") / "logs" / "today.log"
print(p.name)
print(p.suffix)