Skip to content
Advertisement

python need to iterate a list over a list of dicts

JavaScript

python need to iterate a list over a list of dicts

I need to iterate the list a over a list of dict b whether the value present or not. If present take some values from b and if not input as 0 for the months till september it should show as 0 and for december,jan and feb its should show 0

my output should be

JavaScript

Advertisement

Answer

An approach using list comprehension:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement