Explanation:
len(s) is a built-in function in Python to get the length of the string s, whereas s.len() calls the len method of the string object s. It’s less common but functionally equivalent to len(s). So, we can use either of these.
Post #759
2.25K