Re: compare two list of dictionaries

2013-10-04 Thread MRAB
On 04/10/2013 03:29, Mohan L wrote: [snip] output1=[ {'count': 3 , 'ip': 'xxx.xx.xxx.1'}, {'count': 4, 'ip': 'xxx.xx.xxx.2'}, {'count': 8, 'ip': 'xxx.xx.xxx.3'}, {'count': 10, 'ip': 'xxx.xx.xxx.4'}, {'count': 212, 'ip': 'hostname1'}, {'count': 27, 'ip': 'hostname2'}, {'count': 513, 'ip':

Re: compare two list of dictionaries

2013-10-04 Thread Tobiah
On 10/03/2013 09:11 AM, Mohan L wrote: Dear All, I have two list of dictionaries like below: In the below dictionaries the value of ip can be either hostname or ip address. output1=[ {'count': 3 , 'ip': 'xxx.xx.xxx.1'}, {'count': 4, 'ip': 'xxx.xx.xxx.2'}, {'count': 8, 'ip': 'xxx.xx.xxx.3'},

compare two list of dictionaries

2013-10-03 Thread Mohan L
Dear All, I have two list of dictionaries like below: In the below dictionaries the value of ip can be either hostname or ip address. output1=[ {'count': 3 , 'ip': 'xxx.xx.xxx.1'}, {'count': 4, 'ip': 'xxx.xx.xxx.2'}, {'count': 8, 'ip': 'xxx.xx.xxx.3'}, {'count': 10, 'ip': 'xxx.xx.xxx.4'},

Re: compare two list of dictionaries

2013-10-03 Thread MRAB
On 03/10/2013 17:11, Mohan L wrote: Dear All, I have two list of dictionaries like below: In the below dictionaries the value of ip can be either hostname or ip address. output1=[ {'count': 3 , 'ip': 'xxx.xx.xxx.1'}, {'count': 4, 'ip': 'xxx.xx.xxx.2'}, {'count': 8, 'ip': 'xxx.xx.xxx.3'},

Re: compare two list of dictionaries

2013-10-03 Thread Mohan L
On Fri, Oct 4, 2013 at 12:14 AM, MRAB pyt...@mrabarnett.plus.com wrote: On 03/10/2013 17:11, Mohan L wrote: Dear All, I have two list of dictionaries like below: In the below dictionaries the value of ip can be either hostname or ip address. output1=[ {'count': 3 , 'ip':