#incoding:utf-8
str1 = "str1 t w"
str2 = "str2 w w"
li1 = []
li2 = []
for i in str1:
if i==" ":
continue
li1.append(i)
print(li1)
for j in str2:
if j==" ":
continue
li2.append(j)
print(li2)
for x in range(len(li1)):
if li1[x]!=li2[x]:
print(x,li1[x],li2[x])
#输出结果 """
['s', 't', 'r', '1', 't', 'w']
['s', 't', 'r', '2', 'w', 'w']
3 1 2
4 t w
"""