Skip to content

Instantly share code, notes, and snippets.

def sherlockString(s):
# Split string into list of characters
_s = list(s)
# Initialize our dictionary with key: letter, value: number of occurence
dict = {}
# Iterate through string
for item in _s: