I found a couple of answers online but I don't quite understand why the answer is right:
The length of a string is:
If a string has no characters, then its length is 0.
Otherwise, the length of the string is 1 + length of the tail
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.Sign up to join this community