In Python programming language, a dictionary is a collection of an unordered collection of data values in the form of key-value pair. And, a sequence is a generic term for an ordered set.
Here, we are creating a Python program in which we are creating a dictionary from a given sequence.
To create a dictionary from a given sequence – we can use the dict() function, which is a built-in function in Python. It is used to create a dictionary.
Syntax:
dictionary_name = dict(sequence)
                                                                     
                            
Program:
Output:
dict_a : {1: 'apple', 2: 'ball', 3: 'cat'} 1 : apple 2 : ball 3 : catneed an explanation for this answer? contact us directly to get an explanation for this answer