Yes. You can modify the code above by replacing in with == to check for exact matches. For example: result = [item for item in list1 if any(substring == item for substring in list2)]