python實現
a=str(input()) b=str(input()) for i in b: while i in a: loc=a.index(i) a=a[:loc]+a[loc+1:] print(a)