Advertisement
George_Ivanov05

0.2

Jun 14th, 2022
920
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. def function(a):
  2.     my_dict = {}
  3.     for i in a:
  4.         if i not in my_dict:
  5.             my_dict[i] = 0
  6.         my_dict[i] += 1
  7.  
  8.     return my_dict
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement