python check for matches in two lists