Consider the word `"abode"`. We can see that the letter `a` is in position `1` and `b` is in position `2`. In the alphabet, `a` and `b` are also in positions `1` and `2`. Notice also that `d` and `e` in `abode` occupy the positions they would occupy in the alphabet, which are positions `4` and `5`. 

Given an array of words, return an array of the number of letters that occupy their positions in the alphabet for each word. For example,
```
solve(["abode","ABc","xyzD"]) = [4, 3, 1]
```
See test cases for more examples.

Input will consist of alphabet characters, both uppercase and lowercase. No spaces.

Good luck!

If you like this Kata, please try: 

[Last digit symmetry](https://www.codewars.com/kata/59a9466f589d2af4c50001d8)

[Alternate capitalization](https://www.codewars.com/kata/59cfc000aeb2844d16000075)

~~~if:fortran
## Fortran-Specific Notes

Due to how strings and arrays work in Fortran, some of the strings in the input array will inevitably contain trailing whitespace.  **For this reason, please [trim](https://gcc.gnu.org/onlinedocs/gcc-4.3.4/gfortran/TRIM.html) your input strings before processing them.**
~~~

Difficulty: introductory

Starter code:

def solve(arr):
	

Solutions:
def solve(arr):
    return [ sum(c == chr(97+i) for i,c in enumerate(w[:26].lower())) for w in arr ]

from string import ascii_lowercase as alphabet

def solve(arr):
    return [sum(c == alphabet[i] for i,c in enumerate(word[:26].lower())) for word in arr]

from operator import eq
from string import ascii_lowercase

def solve(strings):
    return [sum(map(eq, s.lower(), ascii_lowercase)) for s in strings]

def solve(arr):
    return [sum(i == ord(c) - ord('A') for i, c in enumerate(s.upper())) for s in arr]

def solve(arr):
    lst = []
    for string in arr:
        counter = 0
        for index, letter in enumerate(string):
            if index + 1 == ord(letter.upper()) - 16 * 4:
                counter += 1
        lst.append(counter)
    return lst

def solve(arr): 
    return [['abcdefghijklmnopqrstuvwxyz'.index(y) == x  for x,y in enumerate(e.lower())].count(True) for e in arr]


def solve(arr):
    a=[x.lower() for x in arr]
    b=[]
    for x in a:
        aa=0
        for i in range(len(x)):
            if ord(x[i])-96==i+1:
                aa=aa+1
        b.append(aa)
    return(b)        

def solve(arr):
    return [sum(ord(v) - 96 == i for i,v in enumerate(word.lower(), 1)) for word in arr]

def solve(words):
  return [sum(a==b for a, b in zip(w.lower(), 'abcdefghijklmnopqrstuvwxyz')) for w in words]

def solve(arr):
    return list(map(helper, arr))
    
def helper(str):
    count = 0
    i = 0
    for char in str:
        if ord(char) & 31 == i + 1:
            count += 1
        i += 1
    return count

def solve(arr):
    return [sum(ord(c.lower()) == i for i, c in enumerate(w, 97)) for w in arr]

def solve(arr):
    res=[]
    for w in arr:
        res.append(sum(ord(l.lower())-97==i for i,l in enumerate(w)))
    return res


def solve(arr):
    return [sum(
      ord(ltr) == i + 65 for i, ltr in enumerate(str.upper())
    ) for str in arr]

def solve(arr):
    def cou(arg):
        al = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 'l': 12,
              'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, 'r': 18, 's': 19, 't': 20, 'u': 21, 'v': 22,
              'w': 23, 'x': 24, 'y': 25, 'z': 26}
        num = 0
        arg = ("".join(arg)).lower()
        for x in range(len(arg)):
            if x + 1 == al[arg[x]]:
                num += 1
        return num

    res=[]
    for x in range(len(arr)):
        res.append(cou(arr[x]))
    return res

import string

def solve(arr):
    corrects = []
    for word in arr:
        correct_place = 0
        for index, char in enumerate(word):
            alph_index = string.ascii_lowercase.find(char.lower())
            if index == alph_index:
                correct_place = correct_place + 1
        corrects.append(correct_place)
    return corrects


def solve(arr):
    abc ='abcdefghijklmnopqrstuvwxyz'
    res = []
    for word in arr:
        word = word.lower()
        count = 0
        for i, letter in enumerate(word):
            if i == abc.index(letter):
                count +=1
        res.append(count)
    return res


def solve(arr):
    return [sum(ord(i.lower()) - 96 == indx for indx, i in enumerate(word, 1)) for word in arr]

solve=lambda arr: [sum(ord(l.lower())-97==i for i,l in enumerate(s)) for s in arr]

def letter_to_int(letter):
    alphabet = list('abcdefghijklmnopqrstuvwxyz')
    return alphabet.index(letter) + 1
def solve(arr):
    result = []
    arr = [i.lower() for i in arr]
    for word in arr:
        counter = 0
        for i in range (0,len(word)):
            if letter_to_int(word[i]) == i+1:
                counter = counter+1
        result.append(counter)        
    return(result)    

def cuantas(w):
    return sum([1 if i+1==ord(v)-ord('a')+1 else 0 for i,v in enumerate(w.lower())])

def solve(arr):
    return [cuantas(w) for w in arr]

def solve(arr):
    abc = "abcdefghijklmnopqrstuvwxyz"
    result = []
    for word  in arr:
        count = 0
        word = word.lower()
        for i,letter in enumerate(word):
            if i == abc.index(letter):
                count +=1
        result.append(count)  
    return result   
            
    


def solve(arr):
    abc = "abcdefghijklmnopqrstuvwxyz"
    res = []
    for word in arr:
        count = 0
        word = word.lower()
        for i, letter in enumerate(word):
            if i == abc.index(letter):
                count += 1
        res.append(count)
    return res
    


def solve(arr):
    return  [(sum(1 for i in range(len(w)) if ord(w[i].lower()) - 96 == i+1)) for w in arr]

def solve(arr):
    counts = []
    alpha = "abcdefghijklmnopqrstuvwxyz"
    for i in range(len(arr)):
        count = 0
        for j in range(min(len(arr[i]),len(alpha))):
            if arr[i][j].lower() == alpha[j]:
                count += 1
        counts.append(count)
    return counts

def solve(arr):
    master_list = []
    for s in arr:
        count = 0
        for idx, char in enumerate(s):
            if idx == ord(char.lower()) - 97:
                count += 1
        master_list.append(count)
    return master_list

def solve(arr):
    alphabet = "abcdefghijklmnopqrstuvwxyz"
    return_list = []
    for word in arr:
        print(word)
        counter = 0
        for i in range(len(word) if len(word) <= len(alphabet) else 25):
            if word.lower()[i] == alphabet[i]:
                counter += 1
        return_list.append(counter)
        
    return return_list

def solve(arr):
    abc = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
    arr2 = []
    for el in arr:
        count = 0
        for i in range(len(el)):
            if el.lower()[i] == abc[i]:
                count = count + 1
        arr2.append(count)
    return arr2       

def solve(arr):
    print(arr)
    abc = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
    res = []
    for el in arr:
        counter = 0
        for i in range(len(el)):
            if el.lower()[i] == abc[i]:
                counter += 1
        res.append(counter)
    return res

def solve(arr):
    abc = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
    res = []
    for el in arr:
        counter = 0
        for i in range(len(el)):
            if el.lower()[i] == abc[i]:
                counter += 1
        res.append(counter)
    return res

def solve(arr):
    s = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
    res = []
    for el in arr:
        counter = 0
        for i in range(len(el)):
            if el.lower()[i] == s[i]:
                counter += 1
        res.append(counter)
    return res

def solve(arr):
    return [sum(1 for i,c in enumerate(w) if i == 'abcdefghijklmnopqrstuvwxyz'.index(c.lower()) ) for w in arr]

from string import ascii_lowercase
from collections import Counter

#try using zip
def solve(arr):
    
    counts = []
    
    for word in arr:
        
        count = Counter()
        
        zipped = list(zip(list(word.lower()), list(ascii_lowercase)))
        matches = [z for z in zipped if z[0] == z[1]]
        counts.append(len(matches))
    
    return counts
        
        
        


from string import ascii_lowercase 

def solve(arr):
    
    counts = []
    
    for word in arr:
        
        count = 0
        
        for idx, val in enumerate(word.lower()):
            
            if idx == ascii_lowercase.index(val): count += 1
                
        counts.append(count)
    
    return counts

def solve(arr):
    alpha = 'abcdefghijklmnopqrstuvwxyz'
    return [sum([1 if i == alpha.find(c.lower()) else 0 for i,c in enumerate(x)]) for x in arr]

from string import ascii_lowercase

def solve(arr):
    print(arr)
    return [sum(1 for idx, _ in enumerate(word) if idx < 26 and word[idx].lower() == ascii_lowercase[idx]) for word in arr]

def solve(s):
    return [sum(i==ord(a.lower())-ord('a') for i, a in enumerate(s[j])) for j, _ in enumerate(s)]

from string import ascii_lowercase as letters

def solve(arr):
    return [sum(1 for i, c in enumerate(s) if i == letters.index(c.lower())) for s in arr]

import string
def solve(arr): 
    return list([sum([1 for i in range(len(x)) if i<26 and x[i].lower() == string.ascii_lowercase[i]]) for x in arr])


import string
def solve(arr):
    k = []
    for word in arr:
        count = 0
        for i in range(len(word)):
            if i < 26 and word[i].lower() == string.ascii_lowercase[i]:
                count += 1
        k.append(count)   
    return k


def solve(arr):
    l = []
    n = 0
    for x in arr:
        for y in range(1, len(x) + 1):
            if y == ord(x[y - 1].lower()) - 96:
                n += 1
        l.append(n)
        n = 0
    return l

import string
a = string.ascii_lowercase
def solve(arr):
    p = 0
    m = []
    for s in arr:
        if len(s) > len(a):
            s = s[:len(a)]
        for num, i in enumerate(s):
            if i.lower() == a[num]:
                p+=1
        m.append(p)
        p = 0
    return m

def solve(arr):
    letters = ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z')
    count = 0
    cw = []
    
    for j in range(len(arr)):
        count = 0
        for i in range(len(arr[j])):
            if i > 24:
                break
            elif (arr[j][i]).lower() == letters[i]:
                count +=1
        cw = cw + [count]
    return cw

def solve(arr):
    
    def f(x):
        return sum([1 for i in range(len(x)) if ord(x[i].lower()) - 97 == i])
    
    return [f(i) for i in arr]

def solve(arr):
    res = []
    count = 0
    for word in arr:
        for i in range(len(word)):
            #print(ord(word[i]))
            if i == ord(word.lower()[i]) - 97:
                count += 1
        res.append(count)
        count = 0
    return res

def solve(arr):
    result = []
    counter_correct = 0
    alphabet = "abcdefghijklmnopqrstuvwxyz"
    for a in arr:
        a = a.lower()
        counter_correct = 0
        for i in range(len(a)):
            if i == alphabet.index(a[i]):
                counter_correct += 1
        result.append(counter_correct)
    return result

def solve(arr):
    arrr = []
    for x in arr:
        res = 0
        start = ord('a')
        for y in x:
            if start == ord(y.lower()):
                res += 1
            start += 1
        arrr.append(res)
    return arrr

def solve(arr):
    ans = []
    for i in arr:
        ans.append(0)
        for j in range(len(i)):
            if ord(i[j].lower())-97 == j:
                ans[-1] +=1
    return ans

def solve(x):
    return [len([e for i,e in enumerate(i) if ord(e.lower())-97==i])for i in x]

def solve(arr):
    alpha = 'abcdefghijklmnopqrstuvwxyz'
    res = []
    for word in arr:
        count = 0
        for i in range(len(word)):
            try:
                if word[i].lower()==alpha[i]:
                    count += 1
            except IndexError:
                count = count
        res.append(count)
    return res

def solve(arr):
    return [sum((ord(c) - 97 == i) for i, c in enumerate(s.lower())) for s in arr]

import string

def solve(arr):
    alphabet = string.ascii_lowercase
    result = []
    for i in range(len(arr)):
        part_result = 0
        test_word = arr[i].lower()
        for j in range(len(test_word)):
            if j >= len(alphabet):
                continue
            if test_word[j] == alphabet[j]:
                part_result += 1
        result.append(part_result)
    return result

def solve(arr):
    alpha = 'abcdefghijklmnopqrstuvwxyz'
    return [sum(1 if i < 26 and alpha[i] == c else 0 for i, c in enumerate(w.lower())) for w in arr]

def solve(arr):
    l=[]
    for i in arr:
        c=0
        for j in range(0,len(i)):
            if j+1==ord(i[j].lower())-96:
                c+=1
        l.append(c)
    return l

from string import ascii_lowercase as ref

def solve(arr):
    return [sum([x.lower()[i]==ref[i] for i in range(min(26,len(x)))]) for x in arr]

def solve(arr):
    result = []
    return [sum([0 if y - ord(x[y].lower()) + 97 else 1 for y in range(len(x))]) for x in arr]     

def solve(a):
    t = [chr(x+96) for x in range(1,27)]
    return [sum([x.lower()[y]==t[y] for y in range(min(len(x),26))]) for x in a]


def solve(arr):
  alph = range(ord('a'), ord('z') + 1)
  
  res = []
  for s in arr:
    sl = s.lower()
    val = 0
    for i in range(len(sl)):
      if i >= len(alph):
        break
        
      if ord(sl[i]) == alph[i]:
        val += 1
    res.append(val)
  return res

def solve(arr):
    r=[]
    for w in arr:
        r.append(sum(1 for i,c in enumerate(w.lower()) if ord(c)==ord('a')+i))
    return r

def solve(l):
    l1 = []
    for i, _ in enumerate(l):
        l1.append(list([ord(x.lower()), i+97] for i, x in enumerate(l[i])
                        if ord(x.lower()) == i+97))
        l2 = [len(x) for x in l1]
    return l2

def solve(arr):
    arr = [s.lower() for s in arr]
    res = [[ord(c)-97 for c in s] for s in arr]
    res = [[subres[i] for i in range(len(subres)) if subres[i] == i] for subres in res]
    return [len(subres) for subres in res]


def solve(arr):
    return list(map(lambda a: sum(i == ord(x) - 96 for i, x in enumerate(a.lower(), 1)), arr))

def solve(arr):
    res = []
    for word in arr:
        count = 0
        for i, c in enumerate(word.lower()):
            if ord(c) - 97 == i: count += 1
        res.append(count)
    return res

from string import ascii_lowercase
def solve(arr):
    return [[(string_letter == alphabet_letter) for string_letter, alphabet_letter
             in zip(i.lower(), ascii_lowercase)].count(True)
            for i in arr]

from string import ascii_lowercase
def solve(arr):
    alphabet = list(ascii_lowercase)
    return_arr = []
    for i in arr:
        count = 0
        for j in range(0, len(i)):
            if j == alphabet.index(i[j].lower()):
                count += 1
        return_arr.append(count)
    return return_arr


def solve(arr):
    result = []
    for s in arr:
        result.append(sum(1 for i, c in enumerate(s.lower()) if ord(c)-97 == i )) 
    return result

def solve(arr):
    return [sum(1 if ord(i.lower()[j])-96==j+1 else 0 for j in range(len(i))) for i in arr]

def solve(arr):
    result = []
    count = 0
    for el in arr:
        for i in range(len(el)):
            if i + 1 == ord(el[i].lower()) - 96:
                count += 1
        result.append(count)
        count = 0
    return result

def solve(arr):
    res=[]
    for i in arr:
        c=0
        for j in range(len(i)):
            if j==ord(i.upper()[j])-65:
               c+=1
        res+=[c]
    return res


def solve(arr):
    return [sum(c.lower() == chr(97+i) for i,c in enumerate(w)) for w in arr]

def solve(arr):
    return [sum((ord(c.lower())-96) == i+1 for i, c in enumerate(m)) for m in arr]


def solve(arr):
    return [ sum( i == ord(l)-97  for i,l in enumerate(word.lower())) for word in arr]

import string
def solve(arr):
    return [sum(ch == string.ascii_lowercase[i] for i, ch in enumerate(word[:26].lower())) for word in arr]

import string
def solve(arr):
    return [sum(ch == string.ascii_lowercase[i] for i, ch in enumerate(word.lower()[:26])) for word in arr]

def solve(arr):
    narr = []
    for x in arr:
        i=0
        for j in range(len(x)):
            if ord(x[j].lower())-97 == j:
                i+=1
        narr.append(i)
    return narr

def solve(arr):
    return [len([ord(c.lower())-97 for idx, c in enumerate(a) if ord(c.lower())-97 == idx]) for a in arr]


def solve(arr):
    output = [0] * len(arr)
    for i in range(0, len(arr)):
        for j in range(0, len(arr[i])):
            if ord(arr[i][j].lower())-97 == j:
                output[i] += 1  
    return output


def solve(arr):

    alphabet = {chr(i+96):i for i in range(1,27)}
    arr_list = []

    for word in arr:
        ct = 0
        for pos,letter in enumerate(word.lower(),1):
            if alphabet[letter] == pos:
                ct +=1
        arr_list.append(ct)
    return arr_list

from string import ascii_lowercase

def solve(arr):
    return [
        sum(ascii_lowercase.index(c) == i for i, c in enumerate(word.lower()))
        for word in arr
    ]

def solve(arr):
    l = []
    for i in arr :
        a = 0
        i = i.lower()
        for ii in range(len(i)) :
            if ii == ord(i[ii])-97 : a+=1
        l.append(a)
    return l

def solve(arr):
    return [sum(j.lower() == k for j,k in zip(i,"abcdefghijklmnopqrstuvwxyz")) for i in arr]

def solve(arr):
    return [sum(1 for i,c in enumerate(strng.lower()) if i==ord(c)-97) for strng in arr]

def solve(arr):
    result = []
    for word in arr:
        cnt = 0
        for idx in range(len(word)):
            if ord(word[idx].lower()) - ord('a') == idx:
                cnt += 1
        result.append(cnt)
    return result

def solve(arr):
    return [sum(ord(c) - ord('a') == i for i,c in enumerate(s.lower())) for s in arr]

import string
def solve(arr):
    return [(sum(1 for x in range(len(word)) if word.lower()[x] == string.ascii_letters[x])) for word in arr]

def solve(arr):
    res = []
    for word in arr:
        sum = 0
        for index, letter in enumerate(word.lower()):
            if (index + 1) == (ord(letter)-96):
                sum += 1
        res.append(sum)

    return res


def solve(arr):
    # return the number of letters that occupy their positions inthe alphabet
    # create alphabet list
    alpha = [chr(i) for i in range(ord('a'), ord('z')+1, 1)]
    lst = []
    for item in arr:  # have to compare them in the same case
        lst.append(sum([x.lower() == y.lower() for (x, y) in zip(alpha, item)]))        
    return lst

def solve(arr):
    alfabetet = 'abcdefghijklmnopqrstuvwxyz'
    res = []
    r = 0
#     for d in range(0, len(arr)):
#         for t in range(0, len(arr[d])):
#             if arr[d][t].lower() == alfabetet[t]:
#                 r += 1
#         res.append(r)
#         r = 0
#     return res

#     for char in arr:
#         for c in char.lower():
#             print(c)
#              if c == alfabetet[c]:
#                  r += 1

    for char in arr:
        for a, b in zip(char.lower(), alfabetet):
            if a == b:
                r += 1
        res.append(r)
        r = 0
    return res



def solve(arr):
    output = []
    for string in arr:
        count = 0
        for i in range(0,len(string)):
            if ord(string[i].lower()) == (97+i):
                count += 1
        output.append(count)
    return output

from typing import List
from string import ascii_lowercase


def solve(arr: List[str]) -> List[int]:
    return [sum(c == i for i, c in zip(ascii_lowercase, a.lower())) for a in arr]


def solve(arr):
    cunt = []
    for fuck in arr:
        temp = 0
        for index, cum in enumerate(fuck):
            if ord(cum.lower()) - 96 == index + 1:
                temp += 1
        cunt.append(temp)
    return cunt

from string import ascii_lowercase as lower_alpha
def solve(arr):
    return [sum(char == lower_alpha[i] for i,char in enumerate(word[:26].lower())) for word in arr]

from string import ascii_lowercase as al
def solve(arr):
    arr = map(str.lower,arr)
    result, counter = [], 0
    for word in arr:
        for i, c in enumerate(word):
            if i == al.index(c):
                counter += 1
        result.append(counter)
        counter = 0
    return result

import string

def solve(arr: list):
    arr = list(map(str.lower, arr))
    same = []
    for s in arr:
        same.append(0)
        for a, b in zip(string.ascii_lowercase, s):
            same[-1] += a == b
    return same

def solve(arr):
    from string import ascii_lowercase as alphabet
    count, total = 0, []
    for word in arr:
        for c,letter in enumerate(word[0:26].lower()):
            if letter == alphabet[c]:
                count += 1
        total.append(count)
        count = 0
    return total

from string import ascii_lowercase

def solve(arr):
    return [sum(c1 == c2 for c1, c2 in zip(s.lower(), ascii_lowercase)) for s in arr]

def solve(arr):
    return [sum(1 for i,x in enumerate(y.lower()) if ord(x) - 96 == i +1) for y in arr]

def solve(arr):
    answer = []
    for word in arr:
        answer.append(sum(1 for i, elem in enumerate(word.lower()) if ord(elem)-96 == i+1))
    return(answer)

solve = lambda lst: [sum(i == ord(c.lower()) - 97 for i, c in enumerate(s)) for s in lst]

import string

def solve(arr):
    alphabet_indexes = list(enumerate(string.ascii_lowercase))
    letters_count = []
    for word in arr:
        num_of_letters = 0
        letters_indexes = list(enumerate(word.lower()))
        if len(word) > len(alphabet_indexes):
            word = word[:26]
        for i in range(len(word)):
            if letters_indexes[i] == alphabet_indexes[i]:
                num_of_letters += 1
        letters_count.append(num_of_letters)
    return letters_count

def solve(arr):
    res=[]
    for i in arr:
        tmp=0
        for e,j in enumerate(i.lower()):
            if chr(e+97)==j:
                tmp+=1
        res.append(tmp)
    return res