1key = { "India", "Austria", "USA", "Pakistan", "Czech Republic"}
2value = "Country"
3countries = dict.fromkeys(key, value) # function fromkeys
4counties
5#returns {'USA': 'Country',
6 'Pakistan': 'Country',
7 'Austria': 'Country',
8 'India': 'Country',
9 'Czech Republic': 'Country'}
1sequence1={1,2,3}
2sequence2={"a","b","c"}
3values1="Numbers"
4values2="Alphabets"
5dict1.fromkeys(sequence1,values1)
6#returns {1: 'Numbers', 2: 'Numbers', 3: 'Numbers'}
7
8dict2.fromkeys(sequence2,values2)
9#returns {'c': 'Alphabets', 'b': 'Alphabets', 'a': 'Alphabets'}
10