from collections import defaultdict
emp = {'aras': 'blr', 'chiddhu': 'blr', 'anand': 'chennai', 'suresh':
    'warrington', 'anantha': 'warrington', 'selvam': 'mumbai'}
employees = dict()
for name, city in emp.items():
    if city in employees.keys():
        employees[city].append(name)
    else:
        employees[city] = [name]
print(employees)

4561649d6627f620bdee5f787459e3d8f492f14d
<mask token>

<mask token>
for name, city in emp.items():
    if city in employees.keys():
        employees[city].append(name)
    else:
        employees[city] = [name]
print(employees)

<mask token>
emp = {'aras': 'blr', 'chiddhu': 'blr', 'anand': 'chennai', 'suresh':
    'warrington', 'anantha': 'warrington', 'selvam': 'mumbai'}
employees = dict()
for name, city in emp.items():
    if city in employees.keys():
        employees[city].append(name)
    else:
        employees[city] = [name]
print(employees)

from collections import defaultdict
emp = {'aras': 'blr', 'chiddhu': 'blr', 'anand': 'chennai', 'suresh':
    'warrington', 'anantha': 'warrington', 'selvam': 'mumbai'}
employees = dict()
for name, city in emp.items():
    if city in employees.keys():
        employees[city].append(name)
    else:
        employees[city] = [name]
print(employees)
