Q. What is the output of dict(zip([‘a’, ‘b’], [1, 2]))?
Solution:
zip([‘a’, ‘b’], [1, 2]) pairs keys and values, creating {‘a’: 1, ‘b’: 2}.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
zip([‘a’, ‘b’], [1, 2]) pairs keys and values, creating {‘a’: 1, ‘b’: 2}.
Strengthen Your Practice with our comprehensive question bank.