Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count = [0] * 130
- f = open('input.txt')
- maxCount = 0
- for word in f:
- for letter in word:
- if letter != ' ' and letter != '\n':
- count[ord(letter)] += 1
- for elem in count:
- if elem > maxCount:
- maxCount = elem
- while maxCount != 0:
- for i in range(len(count)):
- if count[i] != 0:
- if count[i] < maxCount:
- print(' ', sep='', end='')
- else:
- print('#', sep='', end='')
- maxCount -= 1
- if maxCount != 0:
- print()
- else:
- print()
- for j in range(len(count)):
- if count[j] != 0:
- print(chr(j), sep='', end='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement