Naar hoofdinhoud
πŸ”’ Voorbeeldmodus. De eerste vijftien Foundations-lessen zijn gratis; deze is Pro. Start een 7-daagse trial om de editor, AI-hints en de rest van het curriculum te ontgrendelen. Kaart vereist, op elk moment opzegbaar in Dashboard.Start 7-daagse trial β†’
⚑
← Cursussenβ€ΊPython FoundationsModule 8 Β· Moderne Python en sluitsteenβ€Ίpathlib β€” moderne padafhandelingpredict163 / 174
+100 XP
Opdracht🌐 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.
Voorspel uitvoer

Lees de code zorgvuldig

from pathlib import Path

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

Wat zal het programma uitprinten? Schrijf hier: