Python-TheNoTheoryGuide icon indicating copy to clipboard operation
Python-TheNoTheoryGuide copied to clipboard

002_conditionals - Incorrect String Comparison

Open nkalavak opened this issue 6 years ago • 1 comments

Hi, the comparison between strings "Jennifer" > "Python" results in "False" but your comment suggests it is true. Why is that?

image

nkalavak avatar Feb 27 '19 23:02 nkalavak

It should be False as Jennifer is comes lexographically before so it is smaller. Thus the expression is False. Try it out with 'J' > 'P' you will get the same result.

And can you please make a pr, to update the comment?

iArunava avatar Mar 06 '19 12:03 iArunava