Manual Lowercase
In this exercise, you will convert letters to lowercase yourself instead of relying on str.lower. Given a string word, replace every uppercase ASCII letter with its matching lowercase letter. Leave all other characters exactly as they are, and return the new string. Do not use str.lower.
Примеры
Ввод
"wow"Вывод
"wow"Ввод
"HellZo"Вывод
"hellzo"Ввод
"WHAT"Вывод
"what"Нужно реализовать
def lower(word: str) -> str:
Теги
strings
Logáil isteach chun stair na n-aighneachtaí a fheiceáil
Logáil isteachLogáil isteach chun an Meantóir IS a úsáid
Logáil isteachVisible tests
1
Input
"wow"Expected
"wow"2
Input
"HellZo"Expected
"hellzo"3
Input
"WHAT"Expected
"what"4
Input
"wh[]32"Expected
"wh[]32"5
Input
"whAT"Expected
"what"6
Input
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Expected
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Focus radio
Paused · SomaFM · Fluid