# Input dictionary.
files = {
        'Input.txt': 'Randy',
        'Code.py': 'Stan',
        'Output.txt': 'Randy'
    }
# Function to group the files.
def group_by_owners(files):

    # Dictionary object to hold the result.
    result = {}

    for key, value in files.items():

        if value not in result.keys():

            # Insert the values into the resulting dictionary
            # by interchanging the key, values.
            result[value] = [key]
        else:

            # Append the othet file name if the owner is same.
            result[value].append(key)

    return result

print(group_by_owners(files))

124c3c92e4c2f825f91be7ec3a74504b203af9eb
<mask token>

<mask token>


def group_by_owners(files):
    result = {}
    for key, value in files.items():
        if value not in result.keys():
            result[value] = [key]
        else:
            result[value].append(key)
    return result


<mask token>

<mask token>


def group_by_owners(files):
    result = {}
    for key, value in files.items():
        if value not in result.keys():
            result[value] = [key]
        else:
            result[value].append(key)
    return result


print(group_by_owners(files))

files = {'Input.txt': 'Randy', 'Code.py': 'Stan', 'Output.txt': 'Randy'}


def group_by_owners(files):
    result = {}
    for key, value in files.items():
        if value not in result.keys():
            result[value] = [key]
        else:
            result[value].append(key)
    return result


print(group_by_owners(files))

# Input dictionary.
files = {
        'Input.txt': 'Randy',
        'Code.py': 'Stan',
        'Output.txt': 'Randy'
    }
# Function to group the files.
def group_by_owners(files):

    # Dictionary object to hold the result.
    result = {}

    for key, value in files.items():

        if value not in result.keys():

            # Insert the values into the resulting dictionary
            # by interchanging the key, values.
            result[value] = [key]
        else:

            # Append the othet file name if the owner is same.
            result[value].append(key)

    return result

print(group_by_owners(files))
