I want to hash a word in python to count each letter occurence.
c++ code:
int *arr = new int[256](); for(int i=0;i<s.size();i++){ arr[s[i]]++; }
I want to implement the same in python using dictionary or list.
Aucun commentaire:
Enregistrer un commentaire