-
-
Save jezinka/54edd3e2409f42913bb20d1370a63445 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f = open('2.txt', 'r') | |
histogram = {} | |
file = f.read() | |
for char in file: | |
if char != '\n': | |
if char in histogram.keys(): | |
histogram[char] += 1 | |
else: | |
histogram[char] = 1 | |
print histogram |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment