Problem
Given a string word, write a function solution that returns the length of the given string.
Constraints
wordconsists only of lowercase English letters.- The length of
wordis between 1 and 100 inclusive.
Test Case
| Test Case Number | word | return |
|---|---|---|
| 1 | "hello" | 5 |
| 2 | "algorithm" | 9 |
| 3 | "a" | 1 |
Explanation for Test Case 1
- When
word = "hello", the length of the string is 5.
Explanation for Test Case 2
- When
word = "algorithm", the length of the string is 9.
Explanation for Test Case 3
- When
word = "a", the length of the string is 1.