Question: This is a python question regarding nested dictionary where I need to extract several information from it. I have a dictionary with multiple list as
This is a python question regarding nested dictionary where I need to extract several information from it.
I have a dictionary with multiple list as such
{ 1: [4, 2, 1, 3], 2: [4, 3, 1, 2], 3: [4, 3, 1, 2], 4: [1, 3, 4, 2], 5: [2, 3, 4, 1], 6: [2, 1, 3, 4] }
I want to find the length of one list in this dictionary. I need code that can help me achieve this
Then for example list 1 ''1: [4, 2, 1, 3]'', I want to assign each number with a value the first number 4 with a value of 4 equal to the length of list, the second number 2 with a value of 3, the third number 1 with a value 2 and the fourth number 3 with a value 1. So the first in the list gets the highest value the next gets one less and so on. I need code that can help me achieve this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
