I have 2 lists with multiple landline / cellular numbers. Example:
Lista 1: ['0169924233316','01687665544','01978553322']<br>
Lista 2:: ['0169924233316', '01788226541']<br>
Within a for, I compare the 2 lists to find if there is any number repeated, if it does not exist I put that number in a third list. Code:
if not any(lista1[0] in checkNumero for checkNumero in lista2): <br>
lista3.append(lista1[0])
The problem is as follows. I now need to add another field that would be a date-time, causing the lists to become 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 I use the 'any' function to compare both the dictionary num- ber and the dictionary time?