Program - Merge two dictionaries in a single expression


Topic: Program - Merge two dictionaries in a single expression

Solution

currentEmployee = {1: 'Scott', 2: "Eric", 3:"Kelly"}
formerEmployee  = {2: 'Eric', 4: "Emma"}
allEmployee = {**currentEmployee, **formerEmployee}
print(allEmployee)



List all Python Programs