Fwd: Merge Two List of Dict

Nikhil Verma varma.nikhil22 at gmail.com
Thu Dec 1 05:05:09 EST 2016


Just editing the count it was from Indian place value notation.


---------- Forwarded message ----------
From: Nikhil Verma <varma.nikhil22 at gmail.com>
Date: Thu, Dec 1, 2016 at 12:44 PM
Subject: Merge Two List of Dict
To: python-list at python.org


Hey guys

What is the most optimal and pythonic solution forthis situation

A = [{'person_id': '1', 'adop_count': '2'}, {'person_id': '3',
'adop_count': '4'}]
*len(A) might be above 100000*

B = [{'person_id': '1', 'village_id': '3'}, {'person_id': '3',
'village_id': '4'}]
*len(B) might be above 2000000*


OutPut List should be

C = B = [{'adop_count': '2', 'village_id': '3'}, {'adop_count': '4',
'village_id': '4'}]

Thanks in advance





-- 


[image: --]
Nikhil Verma
[image: http://]about.me/nikhil_verma
<http://about.me/nikhil_verma?promo=email_sig>



More information about the Python-list mailing list