Create a dictionary from a list of keys
>>> keys = ["C","G","F#"] >>> # create the dictionary, value defaults to None ... {}.fromkeys(keys) {'C': None, 'F#': None, 'G': None} >>> # give it a default value ... {}.fromkeys(keys, True) {'C': True, 'F#': True, 'G': True} >>> >>> # you can also use dict() in place of {} ... dict().fromkeys(keys, True) {'C': True, 'F#': True, 'G': True}


















