1(ix)
Which of the following string operators in Python is used to find the length of a string 'a'?
- (a)len(a)
- (b)len()
- (c)a.len()
- (d)a.len(a)
Show SolutionHide Solution↓
len(a)
Reason — The function len() is used to find the number of characters in a string. When the string a is passed as an argument, len(a) returns its length.