Sunday, October 13, 2019

Dimik oj - 14 অক্ষর গণনা python3 solution

if __name__ == '__main__':
n = int(input())
for i in range(n):
s = input().strip()
rs  = sorted(list(set(s)))
for x in rs:
cnt = s.count(x)
print("%c = %d" %(x,cnt))
if i < n-1:
print()

No comments: