Saltar al contenido principal
🔒 Modo vista previa. Las primeras quince lecciones de Foundations son gratis; esta es Pro. Inicia un trial de 7 días para desbloquear el editor, las pistas AI y el resto del programa. Tarjeta requerida, cancela cuando quieras en Dashboard.Iniciar trial de 7 días →
← CursosPython FoundationsMódulo 8 · Python moderno y capstonepathlib - manejo de rutas modernopredict163 / 174
+100 XP
Tarea🌐 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.
Predice la salida

Lee el código con atención

from pathlib import Path

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

¿Qué imprimirá el programa? Escribe aquí: