Obs: I know lists in python are not order-fixed, but think that this one will be. And I\'m using Python 2.4
I have a list, like (for example) this one:
You could use a dictionary that would map every first element to its "weight" and then check this dictionary inside a sorting function.
Something like:
d = { "Report": 1, "Article": 2, "Book": 3 } result = sorted(mylist, key=lambda x:d[x[0]])