Compare List A against List B such that whenever any values in A is similar to that of B, it will replace the value of A with that of B

I am relatively new to python and would like to see if this is possible. Let say I have two lists:

#List of Applications(<100 total)
X = ["Microsoft", "Apple", "Nike", "Adidas", ...]

#Imaginary websites that belongs to each application (>10k total)
Y = ["", "", "",...] 

From here I want to compare Y against X, such that whenever any part of a value in Y is a substring of X, then that value of Y will be changed to that of X. Eg.

"" becomes "Microsoft"
"" becomes "Microsoft"
"" becomes "Apple".


Based on your comments (…string from X should be substring of value in Y…):

X = ["Microsoft", "Apple", "Nike", "Adidas"]
Y = ["", "", ""]

# put values from X/Y to lowercase:
X_map = {v.lower(): v for v in X}
Y = [v.lower() for v in Y]

# substitute:
out = []
for a in Y:
    for b in X_map:
        if b in a:



['Microsoft', 'Microsoft', 'Apple']