Ответ:
with open("fe0cbc9346f062b5658dda3877b5282d.txt") as f:
string=f.read()
slov0=string[0]
slovmax=""
count=0
countmax=0
for i in string:
if i==slov0:
count+=1
else:
if count>countmax:
slovmax=slov0
countmax=count
count=1
slov0=i
print(countmax,slovmax)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
with open("fe0cbc9346f062b5658dda3877b5282d.txt") as f:
string=f.read()
slov0=string[0]
slovmax=""
count=0
countmax=0
for i in string:
if i==slov0:
count+=1
else:
if count>countmax:
slovmax=slov0
countmax=count
count=1
slov0=i
print(countmax,slovmax)