DEV Community

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

Posted on

Ibuprofeno.py💊| #83: 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:

👉 D. TypeError

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 intentamos obtener la longitud de un float por lo que tendremos un TypeError por consola.

Top comments (1)

Collapse
 
yowise profile image
a.infosecflavour

Nice exercise!

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay