summaryrefslogtreecommitdiff
path: root/progs/a528.py
blob: e6f7c732988c291495d96d9070806ca16a28d46b (plain)
1
2
3
4
5
6
7
def count_char_position(str1): 
    count_chars = 0
    for i in range(len(str1)):
        if ((i == ord(str1[i]) - ord('A')) or 
            (i == ord(str1[i]) - ord('a'))): 
            count_chars += 1
    return count_chars