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 = ["microsoft.com/123", "microsoft.com/456", "GoldenApple.com",...] 

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.

"microsoft.com/123" becomes "Microsoft"
"microsoft.com/456" becomes "Microsoft"
"GoldenApple.com" becomes "Apple".

Answer

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

X = ["Microsoft", "Apple", "Nike", "Adidas"]
Y = ["microsoft.com/123", "microsoft.com/456", "GoldenApple.com"]

# 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:
            out.append(X_map[b])
            break
    else:
        out.append(a)

print(out)

Prints:

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