I have a python dict as below
mymap={'java':40,'haskell':60,'ruby':50,'python':70,'scala':30,'lisp':80,'scheme':75}
I have the keys put in sublists
mapkeys = [['haskell','java'],['lisp','python'],['scala','scheme'],['ruby']]
Now,I need to create a list of lists of values of these keys as below
[[60,40],[80,70],[30,75],[50] ]
I tried using list comprehension ,but failed to yield any results
Try this:
For a non-nested list, remove the brackets and reverse the
forstatements: