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 trialChristian Vasquez
Python Development Techdegree Student 820 Points'y' versus "y"
When we're asking the user if he or she wants to proceed, since we want the user to enter either the character "y" or "n", shouldn't the y have single quotes instead of double quotes? For example, on line 28, Craig's code is: if should_proceed.lower() == "y". But shouldn't it be: if should_proceed.lower() == 'y'?
1 Answer
Megan Amendola
Treehouse TeacherSingle quotes '
and double quotes "
both create strings, they do the same thing. People tend to have a preference for one over the other and some coding best practices dictate when to use single versus double-quotes. Python's Pep 8 code style standards don't have a preference as long as you stick to a convention throughout your code.