Wednesday, 4 September 2013

Python comparing int, float, etc to lists

Python comparing int, float, etc to lists

So this has been bothering me and I haven't been able to find anything
online about it. Could someone please explain this behavior in python? Why
does it return True rather than throwing an exception? Thanks
In [1]: 1 < [1, 2, 3]
Out[1]: True

No comments:

Post a Comment