View Single Post
Old Feb 5th, 2006, 2:34 PM   #5
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
I will stop to be silly after this:
[PHP]# a mixed object list
list1 = [2, 1.99, [1, 2], (1, 2), {'c': 1, 'b': 2}, "bush"]

# sort/compare order seems to be numerics (float or integer), dictionary, list, string, tuple
print sorted(list1) # [1.99, 2, {'c': 1, 'b': 2}, [1, 2], 'bush', (1, 2)][/PHP]
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote