파이썬 title()

(Python title()에서 넘어옴)

1 개요[ | ]

Python title()
파이썬 title()
  • 문자열 내 띄어쓰기 기준으로 각 단어의 첫글자는 대문자로, 나머지는 소문자로 변환한다.
Python
CPU
0.0s
MEM
8M
0.0s
Copy
print("FooBar".title()) # Foobar

print("hello world!".title())       # Hello World!
print("i with dot".title())         # I With Dot
print("'n ijsberg".title())         # 'N Ijsberg
print("here comes O'Brian".title()) # Here Comes O'Brian

print("her royal highness".title()) # Her Royal Highness
print("loud noises".title())        # Loud Noises
print("хлеб".title())               # Хлеб
Foobar
Hello World!
I With Dot
'N Ijsberg
Here Comes O'Brian
Her Royal Highness
Loud Noises
Хлеб

2 같이 보기[ | ]