Skip to content

Instantly share code, notes, and snippets.

@jezinka

jezinka/2.py Secret

Last active Jul 18, 2017
Embed
What would you like to do?
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