with open("file.txt", "r") as file:data = file.read
count_ABCDEFGH = data.count′A′'A'′A′ + data.count′B′'B'′B′ + data.count′C′'C'′C′ + data.count′D′'D'′D′ + data.count′E′'E'′E′ + data.count′F′'F'′F′ + data.count′G′'G'′G′ + data.count′H′'H'′H′ count_STUVWXYZ = data.count′S′'S'′S′ + data.count′T′'T'′T′ + data.count′U′'U'′U′ + data.count′V′'V'′V′ + data.count′W′'W'′W′ + data.count′X′'X'′X′ + data.count′Y′'Y'′Y′ + data.count′Z′'Z'′Z′ count_K = data.count′K′'K'′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′'A'′A′ + data.count′B′'B'′B′ + data.count′C′'C'′C′ + data.count′D′'D'′D′ + data.count′E′'E'′E′ + data.count′F′'F'′F′ + data.count′G′'G'′G′ + data.count′H′'H'′H′ count_STUVWXYZ = data.count′S′'S'′S′ + data.count′T′'T'′T′ + data.count′U′'U'′U′ + data.count′V′'V'′V′ + data.count′W′'W'′W′ + data.count′X′'X'′X′ + data.count′Y′'Y'′Y′ + data.count′Z′'Z'′Z′ count_K = data.count′K′'K'′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}")