On 02/23/2011 10:22 PM, Edward Martinez wrote:
> Hi,
> 
> I'm new to the list and programming.
> i have a question, why when i evaluate strings ie 'a' > '3' it reports 
> true,  how does python come up with  that?

Welcome! As far as I know, it compares the value of the ord()'s.

>>>ord('a')
97
>>>ord('3')
51

This is their number in the ASCII system. You can also do this:

>>>chr(97)
'a'
>>>chr(51)
'3'

-- 
Corey Richardson
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to