Strings and Console Output Lesson 5


#1


https://www.codecademy.com/courses/python-beginner-sRXwR/1/1?curriculum_id=4f89dab3d788890003000096

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)


#2

yes the space is count so it become 14


#3

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


#4

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