Question Detail
Question
What is the purpose of the
len() function when used with a string in Python?
Correct Answer
Option C is the correct answer.
Detailed Explanation
The document states, 'The len() function counts the number of characters in a string.' It also notes that it counts spaces and punctuation marks.
Hint
The name 'len' is short for 'length'.