日付37-文字列内のCount文字



--------------------------------------------🤞 My Solution -------------------------------------------
def count(string):
    arr = []
    for i in range(0, len(string)):
        arr.append(string[i])
    list = []
    for i in arr:
        if i not in list:
            list.append(i)
    result = {}
    for i in list:
        result[i] = string.count(i)
    return result