Skip to content

Instantly share code, notes, and snippets.

@jamilnoyda
Created September 16, 2020 11:35
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 jamilnoyda/583e4f2362fce5890327cec061eaf8e9 to your computer and use it in GitHub Desktop.
Save jamilnoyda/583e4f2362fce5890327cec061eaf8e9 to your computer and use it in GitHub Desktop.
l = [
1,
2,
3,
3,
3,
4,
4,
4,
5,
5,
5,
5,
]
d = {}
# s = set(l)
for x in l:
if not x in d.keys():
d[x] = l.count(x)
print(d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment