This idea is untested but seems like it should work! > [ 'aa', 'qq', 'ttt', 'hh'] # master list Convert list to dictionary keyed by item and valued by list index ie: master = {'aa':0,'qq':1...'hh':3} Now write a cmp() function that checks the index of your list items against the dictionary index value. Something like: def cmp(a,b): return master[a] - master[b] I think.... Alan G.