On 30-6-2013 20:46, Andrew Z wrote: > Hello, > > print max(-10, 10) > 10 > print max('-10', 10) > -10 > > My guess max converts string to number bye decoding each of the characters to > it's ASCII > equivalent? > > Where can i read more on exactly how the situations like these are dealt with? > > Thank you > AZ >
Use Python 3.x instead. >>> max('-10',10) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unorderable types: int() > str() >>> Irmen -- http://mail.python.org/mailman/listinfo/python-list