Skip to content

Instantly share code, notes, and snippets.

@jezinka

jezinka/2.py Secret

Last active July 18, 2017 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jezinka/54edd3e2409f42913bb20d1370a63445 to your computer and use it in GitHub Desktop.
Save jezinka/54edd3e2409f42913bb20d1370a63445 to your computer and use it in GitHub Desktop.
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