Question #283735

Most frequentl digit in python

Expert's answer

s = input()
ans = [0, 0]
ss =set(s)


for i in ss:
    if ans[0] < s.count(i):
        ans[0] = s.count(i)
        ans[1] = i

print(ans[1])

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS