Python - Magic Methods and Operator Overloading
What does the
len() function return when used on a string in Python?len() function return when used on a string in Python?len() does for stringslen() function counts how many characters are in the string, including spaces and punctuation.len() to a stringlen('hello') returns 5 because there are 5 characters.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions