Python: Converting word to list of letters, then returning indexes of the letters against lower case alphabet
<p>I have already completed the task but in its most basic form looking for help shortening it and so it can apply to any word not just one with eight letters, here's what I've got so far (bit long for what it does):</p>

<pre><code>alpha = map(chr, range(97, 123))
word = "computer"
word_list = list(word)

one = word[0]
two = word[1]
three = word[2]
four = word[3]
five = word[4]
six = word[5]
seven = word[6]
eight = word[7]


one_index = str(alpha.index(one))
two_index = str(alpha.index(two))
three_index = str(alpha.index(three))
four_index = str(alpha.index(four))
five_index = str(alpha.index(five))
six_index = str(alpha.index(six))
seven_index = str(alpha.index(seven))
eight_index = str(alpha.index(eight))

print (one + "=" + one_index)
print (two + "=" + two_index)
print (three + "=" + three_index)
print (four + "=" + four_index)
print (five + "=" + five_index)
print (six + "=" + six_index)
print (seven + "=" + seven_index)
print (eight + "=" + eight_index)
</code></pre>

<p>Start with a <code>dict</code> that maps each letter to its number.</p>

<pre><code>import string
d = dict((c, ord(c)-ord('a')) for c in string.lowercase)
</code></pre>

<p>Then pair each letter of your string to the appropriate index.</p>

<pre><code>result = [(c, d[c]) for c in word]
</code></pre>

python string list