with open("file.txt", "r") as file:data = file.read()
count_ABCDEFGH = data.count('A') + data.count('B') + data.count('C') + data.count('D') + data.count('E') + data.count('F') + data.count('G') + data.count('H')count_STUVWXYZ = data.count('S') + data.count('T') + data.count('U') + data.count('V') + data.count('W') + data.count('X') + data.count('Y') + data.count('Z')count_K = data.count('K')
print(f"Total count of letters A, B, C, D, E, F, G, H: {count_ABCDEFGH}")print(f"Total count of letters S, T, U, V, W, X, Y, Z: {count_STUVWXYZ}")print(f"Total count of letter K: {count_K}")
with open("file.txt", "r") as file:
data = file.read()
count_ABCDEFGH = data.count('A') + data.count('B') + data.count('C') + data.count('D') + data.count('E') + data.count('F') + data.count('G') + data.count('H')
count_STUVWXYZ = data.count('S') + data.count('T') + data.count('U') + data.count('V') + data.count('W') + data.count('X') + data.count('Y') + data.count('Z')
count_K = data.count('K')
print(f"Total count of letters A, B, C, D, E, F, G, H: {count_ABCDEFGH}")
print(f"Total count of letters S, T, U, V, W, X, Y, Z: {count_STUVWXYZ}")
print(f"Total count of letter K: {count_K}")