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

Hier verschijnt het resultaat van je code

Tests12
Visible tests
Verborgen test 7
Verborgen test 8
Verborgen test 9
Verborgen test 10
Verborgen test 11
Verborgen 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