String Length

String length is useful all the time: checking a password, trimming text, or showing a character counter in a form. Write a function string_length that takes a string s and returns how many characters it contains. An empty string has length 0.

Примеры

Ввод
"hello"
Вывод
5
Ввод
""
Вывод
0
Ввод
"a"
Вывод
1

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

def string_length(s: str) -> int:

Теги

strings
PostgreSQLv16

Koodin suorituksen tulos näkyy tässä

Visible tests
1
Input
"hello"
Expected5
2
Input
""
Expected0
3
Input
"a"
Expected1
4
Input
"Rosetta Code"
Expected12
5
Input
" "
Expected3
6
Input
"12345678"
Expected8
Focus radio
Paused · SomaFM · Fluid