DEV Community

Cover image for Ibuprofeno.py💊| #71: Explica este código Python
Cristian Fernando
Cristian Fernando

Posted on • Edited on

1

Ibuprofeno.py💊| #71: Explica este código Python

Explica este código Python

Dificultad: Fácil

print(sep=".", "hola", "mundo")
Enter fullscreen mode Exit fullscreen mode

👉 A. hola.mundo
👉 B. .hola mundo
👉 C. SyntaxError
👉 D. Ninguna de las anteriores


Respuesta en el primer comentario.

Top comments (1)

Collapse
 
duxtech profile image
Cristian Fernando • Edited

Respuesta:
👉 C. SyntaxError
Los argumentos de palabra reservada como end y sep (para la función print) deben ir siempre luego del último argumento posicional.
En nuestro ejemplo, los únicos argumentos posicionales que tenemos son hola y mundo, por ende para que funcione deberíamos reescribirlo de la siguiente manera:

print("hola", "mundo", sep=".")  ## hola.mundo
Enter fullscreen mode Exit fullscreen mode

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more