DEV Community

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

Posted on

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

Explica este código Python

Dificultad: Fácil

print('Hello!2@#World'.istitle())
Enter fullscreen mode Exit fullscreen mode
  • A. True
  • B. False
  • C. None
  • D. Error

Respuesta:

👉 A. True

El método istitle() de las cadenas de Python verifica si una cadena dada cumple con las características de un titulo, de ser ase regresa un True, caso contrario False.

Para que unca cadena sea un titulo necesita que cada palabra de dicha cadena empieza con mayúscula, nosotros solo tenemos una cadena: Hello!2@#World que aunque un poco rara si empieza con mayúscula. Entonces por ello la respuesta es True.

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay