how to use dictionary comprehension to make a dictionary for some names of a list in python
names = ["David", "Sarah", "Matt"]
# it makes name as key and Doctor as value for each name in list names
career = {name:"Doctor" for name in names}
print(career)
#output >>> {'David': 'Doctor', 'Sarah': 'Doctor', 'Matt': 'Doctor'}