Dec-22-2022, 05:17 PM
Hello,
Does exist a method of copying an items from one dict to another, e.g. inside a for loop, under specific conditions ?
I tried
Thanks
Does exist a method of copying an items from one dict to another, e.g. inside a for loop, under specific conditions ?
I tried
for item in dict1.items(): if {condition}: dict2.update(item)Doesn't work.
Thanks