Less complicated version of what you wrote would be:
states = ["alabama","alaska", ... ,"wyoming",]
sset = set()
for s1 in xrange(len(states)):
for s2 in xrange(s1+1, len(states)):
ss = ’’.join(sorted(states[s1] + states[s2]))
if ss in sset:
print states[s1], states[s2]
exit(0)
else:
sset.add(ss)
Jam - 2008-10-27 19:08:54.705851
Less complicated version of what you wrote would be: