How To Convert Generator Object To Dictionary In Python
We are given a generator object we need to convert that object to dictionary. For example, a = (1, 2, 3), b = ('a', 'b', 'c') we need to convert this to dictionary so that the output should be {1: 'a', 2: 'b', 3: 'c'}. Using a Generator ExpressionA generator expression can be used to generate key-va