Python - Classes and Object Lifecycle
Given this class:
How can you create a dictionary mapping employee names to their salaries using these objects?
class Employee:
def __init__(self, name, salary):
self.name = name
self.salary = salary
employees = [
Employee('John', 5000),
Employee('Jane', 6000),
Employee('Doe', 5500)
]How can you create a dictionary mapping employee names to their salaries using these objects?
