Find the elements that appear in both lists.
import time
with open('names_1.txt', 'r') as f:
names_1 = f.read().split("\n") # List containing 10000 names
with open('names_2.txt', 'r') as f:
names_2 = f.read().split("\n") # List containing 10000 names