#creating a functione group_by_owners
def group_by_owners(dict):
    finalDict={}
    for key,values in dict.items():       #iterating on the dictionary items
        finalDict[values]=finalDict.get(values,[])+[key]    #creating a list of values of dictionary and appending it with keys
    print(finalDict)
    return finalDict
    
dict={'input.txt':'randy',
       'code.py':'stan',
        'output.txt':'randy'}
group_by_owners(dict)

cf6d499755888fbcebd2cc62fb9125c6759b9ba2
<mask token>

def group_by_owners(dict):
    finalDict = {}
    for key, values in dict.items():
        finalDict[values] = finalDict.get(values, []) + [key]
    print(finalDict)
    return finalDict


<mask token>

def group_by_owners(dict):
    finalDict = {}
    for key, values in dict.items():
        finalDict[values] = finalDict.get(values, []) + [key]
    print(finalDict)
    return finalDict


<mask token>
group_by_owners(dict)

def group_by_owners(dict):
    finalDict = {}
    for key, values in dict.items():
        finalDict[values] = finalDict.get(values, []) + [key]
    print(finalDict)
    return finalDict


dict = {'input.txt': 'randy', 'code.py': 'stan', 'output.txt': 'randy'}
group_by_owners(dict)

#creating a functione group_by_owners
def group_by_owners(dict):
    finalDict={}
    for key,values in dict.items():       #iterating on the dictionary items
        finalDict[values]=finalDict.get(values,[])+[key]    #creating a list of values of dictionary and appending it with keys
    print(finalDict)
    return finalDict
    
dict={'input.txt':'randy',
       'code.py':'stan',
        'output.txt':'randy'}
group_by_owners(dict)
