s = [s1, s2, s3]sm = {}for h in xrange(len(s)): sm[s[h]] = h print sm
{0: 0}{0: 0, 30: 1}{0: 2, 30: 1}