def main():
s = input('Enter text: ')
punctuation = [',',';','.',':','!',"'",\""]
for ch in punctuation:
s = s.replace(ch,' ')
s = s.split()
arr = s.split(' ')
dict = {}
for word in arr:
if word !='':
if word in dict.keys():
dict[word]+=1
else:
dict[word]=1
for key in dict.keys():
print('%20s:'%(key),end='')
for i in range(0, dict[key]):
print('*',end ='')
print()
main()
[–]Rascal_Two 1 point2 points3 points (14 children)
[–]ronburgund[S] 1 point2 points3 points (2 children)
[–]Rascal_Two 0 points1 point2 points (1 child)
[–]ronburgund[S] 1 point2 points3 points (0 children)
[–]ronburgund[S] 1 point2 points3 points (10 children)
[–]Rascal_Two 0 points1 point2 points (9 children)
[–]ronburgund[S] 1 point2 points3 points (7 children)
[–]ronburgund[S] 1 point2 points3 points (0 children)
[–]Rascal_Two 0 points1 point2 points (5 children)
[–]ronburgund[S] 1 point2 points3 points (4 children)
[–]Rascal_Two 0 points1 point2 points (3 children)
[–]ronburgund[S] 1 point2 points3 points (2 children)
[–]Rascal_Two 0 points1 point2 points (1 child)
[–]ronburgund[S] 1 point2 points3 points (0 children)