排序是根据什么呢?100和Hello怎么比较,然后排序?
L = [Student('Tim','Male',99), Student('Bob','Female',88),100,'Hello']
>>> print sorted(L)
[100, (Bob,Female,88), 'Hello', (Tim,Male,99)]
为什么100排在最前面?。。。谢谢
L = [Student('Tim','Male',99), Student('Bob','Female',88),100,'Hello']
>>> print sorted(L)
[100, (Bob,Female,88), 'Hello', (Tim,Male,99)]
为什么100排在最前面?。。。谢谢
2016-03-23
举报