Questions on list.sort()

Geiger Ho s997659 at ee.cuhk.edu.hk
Thu May 23 22:43:21 EDT 2002


Hi all,

  I would like to know is there any difference between the following two
lines of code:

1. mylist.sort()
2. mylist.sort(lambda a, b: cmp(os.path.normcase(a), os.path.normcase(b))

where mylist = os.listdir('.')

  Thanks in advance.

Regards,
Geiger





More information about the Python-list mailing list