← Back to challenges

Capitalize the Last Letter

PythonHardstringsformattinglanguage_fundamentals

Instructions

Create a function that capitalizes the last letter of every word.

Examples

cap_last("hello") ➞ "hellO"

cap_last("My Name Is Innokodakademija") ➞ "MY NamE IS Innokodakademija"

cap_last("HELp THe LASt LETTERs CAPITALISe") ➞ "HELP THE LAST LETTERS CAPITALISE"

Notes

There won't be any cases of punctuation in the tests.

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.