Capitalize Every Word

This style is often used for catchy phrases, headings, and short quotes. Write to_jaden_case, which capitalizes the first letter of every word in the string s. Words are separated by single spaces, and the rest of each word should stay unchanged.

Примеры

Ввод
"How can mirrors be real if our eyes aren't real"
Вывод
"How Can Mirrors Be Real If Our Eyes Aren't Real"
Ввод
"most trees are blue"
Вывод
"Most Trees Are Blue"
Ввод
"hello world"
Вывод
"Hello World"

Нужно реализовать

def to_jaden_case(s: str) -> str:

Теги

strings
PostgreSQLv16

Tutaj pojawi się wynik wykonania kodu

Tests12
Visible tests
Ukryty test 7
Ukryty test 8
Ukryty test 9
Ukryty test 10
Ukryty test 11
Ukryty test 12

They run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.

Focus radio
Paused · SomaFM · Fluid