Manual Uppercase

This is the kind of work str.upper usually does for you, but here you will build it yourself. Given a string word, replace every lowercase ASCII letter with its matching uppercase letter. Leave all other characters unchanged, and return the new string. Do not use str.upper.

Примеры

Ввод
"wow"
Вывод
"WOW"
Ввод
"Hello"
Вывод
"HELLO"
Ввод
"WHAT"
Вывод
"WHAT"

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

def upper(word: str) -> str:

Теги

strings
PostgreSQLv16

Your code output will appear here

Visible tests
1
Input
"wow"
Expected"WOW"
2
Input
"Hello"
Expected"HELLO"
3
Input
"WHAT"
Expected"WHAT"
4
Input
"wh[]32"
Expected"WH[]32"
5
Input
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Expected"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
6
Input
"wowwow"
Expected"WOWWOW"
Focus radio
Paused · SomaFM · Fluid