Saltar para o conteúdo principal
🔒 Modo de pré-visualização. As primeiras quinze aulas de Foundations são grátis; esta é Pro. Inicie um trial de 7 dias para desbloquear o editor, as dicas AI e o resto do programa. Cartão necessário, cancele a qualquer momento no Dashboard.Iniciar trial de 7 dias →
← CursosPython FoundationsMódulo 8 · Python moderno e conclusãopathlib — manipulação moderna de caminhospredict163 / 174
+100 XP
Tarefa🌐 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.
Prevê a saída

Lê o código com atenção

from pathlib import Path

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

O que o programa vai imprimir? Escreve aqui: