Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a dictionary from two lists: one of keys and one of values.

Medium

Problem Statement

Create a dictionary from two lists: one of keys and one of values.

Sample Input

['a', 'b', 'c'], [1, 2, 3]

Sample Output

{'a': 1, 'b': 2, 'c': 3}

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
def create_dict_from_lists(): keys = ['a', 'b', 'c'] values = [1, 2, 3] # Your code here return
Log in or sign up to run or submit your code.Log inSign up
Input
['a', 'b', 'c'], [1, 2, 3]
Expected Output
{'a': 1, 'b': 2, 'c': 3}