0
I have 2 lists with several fixed/mobile numbers. Example:
Lista 1: ['0169924233316','01687665544','01978553322']<br>
Lista 2:: ['0169924233316', '01788226541']<br>
Within a go, I compare the 2 lists to know if there is any repeated number, if there is not I put that number on a third list. Code:
if not any(lista1[0] in checkNumero for checkNumero in lista2): <br>
lista3.append(lista1[0])
The problem is this. I now need to add another field that would be date-time, making the lists a list of dictionaries. Example:
Lista 1: [{'numero':'0169924233316', 'data':'2017-16-10'},{'numero':'01687665544', 'data':'2017-16-10'},{'numero':'01978553322', 'data':'2017-16-10'}]<br>
Lista 2:: [{'numero':'0169924233316', 'data':'2017-16-10'}, {'numero':'01788226541', 'data':'2017-16-10'}]
How would it be for me to use the 'any' function to compare both the number and the time of the dictionary?