92. Problem to create a dictionary from a sublist in given list

In this Python list program, we will take a list of sublists as input and create a dictionary from a sublist in given list with the help of the below-given steps.

Create dictionary from a sublist:

Steps to solve the program
  1. Take a list of sublists as input.
  2. Convert the given list into a dictionary using dict() and assign it to a variable.
  3. Print the variable to see the result.

Output :

Related Articles

Convert tuples in list into a sublist

Replace ‘Java’ with ‘Python’ from the given list

Leave a Comment