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 →
⚡
← Cursos›Python FoundationsMódulo 7 · Biblioteca estándar avanzada›subprocess.run - predice la salidapredict140 / 174
+100 XP
Tarea🌐 shown in EN
📝 **Task:** Predict the two lines printed by the program. \`echo "hi"\` prints "hi" + newline (stripped) and exits 0. 📋 Edit the starter code below. Tests run automatically. 💡 **Hint:** Re-read the theory if you get stuck.
Predice la salida

Lee el código con atención

import subprocess

result = subprocess.run(
    ["echo", "hi"],
    capture_output=True,
    text=True,
    check=True,
)
print(result.stdout.strip())
print(result.returncode)

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