text = input() dict = {} lis = [] for ch in text: lis += [f"{ch}"] dict[f"{ch}"] = lis.count(ch) print(dict)