文章列表
>>> def sortFunc(x,y):
>>> if x>y:
>>> return 1
>>> elif x==y:
>>> return 0
>>> else x<y:
>>> return -1
>>> list = [5, 1, 3, 2, 4]
>>> list.sort(sortFunc)
[1, 2, 3, ...
- 2009-05-22 14:26
- 浏览 887
- 评论(0)