# 24(39) РТ

 avatar
user_8840555
python
a year ago
322 B
0
Indexable
Never
f = open(r"C:\Users\SnowDrit\Downloads\24\24.39.txt")
s = f.readline()
letters = {}
for i in range(1, len(s)):
    if s[i] == "B":
        if s[i - 1] in letters:
            letters[s[i - 1]] += 1
        else:
            letters[s[i - 1]] = 1
print(letters)
print(max(letters, key=letters.get))
# 24(39) РТ