def it(s): """ counts the number of letters from alphabet and returns this value """ counter = 0 for ch in s: c = ord(ch.lower()) if 97 <=c <= 122: counter += 1 return counter print(it("abc")) print(it("4flj 987f k"))