Create a Python script that takes in a string and returns a dictionary of the number of times each character appears in the string.
Not applicable
def character_count(str):
    d = dict()
    for c in str:
        if c in d:
            d[c] += 1
        else:
            d[c] = 1
    return d