I have this code and want to compare two lists.
list2= [('Tom','100'),('Alex','200')] list3= [('tom','100'),('alex','200')] non_match = [] for line in list2: if line not in list3: non_match.append(line) print(non_match) The results will be:
[('Tom', '100'), ('Alex', '200')] because of case sensitivity! is there any way to avoid the case sensitivity in this case? I don't want to change the lists to upper or lower case.
Or any other method which can match these lists?