[python]how to delete everything except individual words?

x = str(input("what do you want to leave: "))
rices = str(input('the text you want to delete: ').split(x, -1))
riclol = str(input('enter where you want to remove the text you typed above: ').split(rices))
print(riclol.replace(rices, " "))

I tried the split method to insert a string into it ,but it didn’t read it and just output the text I wrote again. it should remove the selected text from the next text .Then in the second sentence,it needs to completely delete all the other sentences in the second text, 3 texts, so that what is written in 1 line is output

I want what I entered on line 1 to display in 3 by removing the text from 2

%d bloggers like this: