Strings and Console Output Lesson 5


According to the lesson, the below code should "show the number of letters in "Norwegian Blue". Norwegian blue has 13 letters but the code returns 14. I think the len string returns the number of characters in a string, the space between Norwegian and Blue being considered a character on its own, hence 14.

parrot = "Norwegian Blue"
print len(parrot)


yes the space is count so it become 14


You might want to change what the lesson says or people will think they're doing something wrong if they don't get 13.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.