Untitled

Anonymous
Plain Text
06/24/2024 1:22 AM
183 B
14
Indexable
Never
a = input("Enter a multi digit number: ")
c = {}
for i in a:
    c.setdefault(i,0)
    c[i] += 1

for key,value in c.items():
    print(f"digit {key} appears {value} times")
    
    
Editor is loading...
Leave a Comment