Possible Duplicate:
How does Python compare string and int?
I was doing some comparison in Python. I was surprised to see that I can compare a string to an integer. then I did an id and found out that actually id for string is greater than id for int and i thought that's the reason I am getting this output.
In [19]: 'a' < 3
Out[19]: False
In [20]: 'a'>3
Out[20]: True
In [17]: id('a')
Out[17]: 140414909035824
In [18]: id(3)
Out[18]: 23119752
Please confirm that I am interpreting this behavior correctly (Python comparing on id level).