Python String istitle() Method

Example

Check if each word starts with a capital letter:

txt = "Hello, And Welcome To My World!"
x = txt.istitle()
print(x)

Run Instance

Definition and Usage

Kung ang lahat ng mga salita sa teksto ay nagsisimula sa may malaking titik at ang ibang bahagi ng salita ay maliit, ibabalik ng istitle() method ang True. Kung hindi, ibabalik ang False.

Ang simbolo at ang numero ay ibubuwagin.

Grammar

string.istitle()

Halaga ng paramtero

Wala ang mga paramtero.

More Examples

Example

Check if each word starts with a capital letter:

a = "HELLO, AND WELCOME TO MY WORLD"
b = "Hello"
c = "22 Names"
d = "This Is %'!?"
print(a.istitle())
print(b.istitle())
print(c.istitle())
print(d.istitle())

Run Instance