Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![fady mohamed](https://secure.gravatar.com/avatar/732f7ee17dd278a1c2a24e63a3ac9367?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
fady mohamed
5,972 PointsAre Spaces Considered Letters in Python?
I know spaces are considered characters so that it is counted when using the len() method for e.g.
However are they also considered letters? Are there any cases where they aren't?
3 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsSpaces are characters but not letters. The term "letters" (or "alpha characters") refers to "a" to "z" or "A" to "Z".
Offhand, I can only think of this distinction being used in Regular Expressions.
![Podrig Leoghain](https://uploads.teamtreehouse.com/production/profile-photos/9820672/micro_Hackerdawg2.jpg)
Podrig Leoghain
5,094 PointsTo add to what Steven Parker wrote, the space in "Happy Birthday" will print because it is in a string.
![Samuel Morgan](https://uploads.teamtreehouse.com/production/profile-photos/11534124/micro_Sam_PF.jpg)
Samuel Morgan
2,226 PointsYeah, the space is included as it is inside the string. print ("S S") would be: S S
fady mohamed
5,972 Pointsfady mohamed
5,972 PointsThanks Steven, I'm just asking because with the code in this video the spaces are also output when using for letters in. I assumed it would just display "HAPPYBIRTHDAY", however it included the space and the exclamation mark. Am I missing something?
Steven Parker
230,688 PointsSteven Parker
230,688 PointsIn the video code, "letter" is just a variable name and has no special significance. You could substitute "noodle" and the program would perform the same.