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>thanks for the help managed to solve it myself in a different way using a function and a while loop, not as short but will work for all lower case words:</p>

<pre><code>alpha = map(chr, range (97,123))
word = "computer"
count = 0
y = 0

def indexfinder (number):
     o = word[number]
     i = str(alpha.index(o))
     print (o + "=" + i)


while count &lt; len(word):
    count = count + 1
    indexfinder (y)
    y = y+1
</code></pre>

python string list