fromkeys in python

sequence1={1,2,3}
sequence2={"a","b","c"}
values1="Numbers"
values2="Alphabets"
dict1.fromkeys(sequence1,values1)
#returns {1: 'Numbers', 2: 'Numbers', 3: 'Numbers'}

dict2.fromkeys(sequence2,values2)
#returns {'c': 'Alphabets', 'b': 'Alphabets', 'a': 'Alphabets'}

Here is what the above code is Doing:
1. dict1.fromkeys(sequence1,values1)
– dict1 is the dictionary we are calling the fromkeys() method on.
– sequence1 is the sequence of values we want to use as keys in the new dictionary.
– values1 is the value we want to assign to each of the keys in the new dictionary.
2. dict2.fromkeys(sequence2,values2)
– dict2 is the dictionary we are calling the fromkeys() method on.
– sequence2 is the sequence of values we want to use as keys in the new dictionary.
– values2 is the value we want to assign to each of the keys in the new dictionary.