Python program to map two lists into a dictionary

Editorial Staff - - Python Programming


Today we are going to share a Python program to map two lists into a dictionary. If you are a python beginner and want to start learning the python programming, then keep your close attention in this tutorial as I am going to share a Python program to map two lists into a dictionary.

Python program to map two lists into a dictionary code

python program and execute it with the help of python compiler.

Output:

Enter number of elements for dictionary:2
For keys:
Enter element1:23
Enter element2:46
For values:
Enter element1:69
Enter element2:138
The dictionary is:
{46: 138, 23: 69}

To increase your Python knowledge, practice all Python programs, here is a collection of 100+ Python problems with solutions.


About: Editorial Staff

Editorial Staff at FreeWebMentor is a team of professional developers leads by Prem Tiwari