I want to compare the first character of two different strings (and so on) to form a new string based on those results. This is what I've tried using, however, it's comparing every element of each list to each other.
def compare(a,b):
s = ""
for x in a:
for y in b:
if x == y:
s+=str(x)
else:
s+=str(y)
It seems like such a simple question but I'm stuck.