DEV Community

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

Posted on

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

Explica este código Python

Dificultad: Fácil

print(len("1.0"))
Enter fullscreen mode Exit fullscreen mode

👉 A. 3
👉 B. 2
👉 C. 1
👉 D. TypeError


Respuesta:

👉 A. 3
La función len de Python sirve para obtener la longitud de un interable, por ejemplo una cadena o una lista, en este caso la cadena 1.0 tiene 3 caracteres: 1, . y 0.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more