Py3在控制台input输入a,b两个文本,怎么查找他们的不同之处?

input控制台输入:a文本

lst1 = list(input('''列表1 '''))
str1 = input('''列表2 ''')
for i in lst1[1:]:
    print(lst1[0]+str1+i)
 
 
for i in lst1[1:]:
    print(lst1[0]+str1+i, end=',')
 
print()
#改进:最后不出现,号
for i,n in enumerate(lst1[1:]):
    print(lst1[0]+str1+n, end=',' if i+2<len(lst1) else '')

input控制台输入:b文本

a = list(int(input('''列表1 ''')))
b = list(int(input('''列表2 ''')))
lst1 = list(a)
str1 = list(b)
for i in lst1[1:]:
    print(lst1[0]+str1+i)
 
 
for i in lst1[1:]:
    print(lst1[0]+str1+i, end=',')
 
print()
#改进:最后不出现,号
for i,n in enumerate(lst1[1:]):
    print(lst1[0]+str1+n, end=',' if i+2<len(lst1) else '')

a = input()
b = input()

c = ""
d = ""
for i in a:
    if i not in b:
        c += i
for i in b:
    if i not in a:
        d += i
print(c,d)

打印出两个字符串不同的地方,绝对不包含那种

a = input()
b = input()

c = ""
d = ""
for i in range(len(a)):
    if i>=len(b):
        c+=a[i]
    elif a[i] != b[i]:
        c+= a[i]
    else:
        c+=" "
for i in range(len(b)):
    if i>=len(a):
        d+=b[i]
    elif a[i] != b[i]:
        d+= b[i]
    else:
        d+=" "
print("{}\n{}".format(c,d))

打印两个字符串,对应位置不相同