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 trialDejuan Castro
198 PointsP > C ? Really.
The question is what would the result from this be. python > chocolate . python is greater than chocolate should result as false but it says it's true. What am I getting wrong?
1 Answer
Steven Parker
231,108 PointsWhen using inequality tests on strings, you're actually comparing dictionary order. Which ever one comes later in the dictionary is considered to be "greater".
So yes, "P > C" (P comes after C).
Luis Munguia Salas
14,797 PointsLuis Munguia Salas
14,797 Pointsyou can get the ASCII value of a character with
check the website below for more values >>>>>>>>
https://www.w3resource.com/python-exercises/python-basic-exercise-86.php