I'm teaching myself Python and I have been stuck on this issue for a few days now.
The idea is to ask a user to input a sentence and then ask them for 5 characters that they would like to remove from the sentence.
For example the sentence input by the user is: user_string = "The quick brown fox jumps over the lazy dog"
The characters they want to remove is: lst = ["a", "b", "c", "d", "e"]
I have reached the point where I have the user string and the user list that needs to be removed, what I'm stuck on is figuring out how to loop through the list and check if each character is present in the string and then to strip it from the string.
I have tried to use a for loop but I'm not yet proficient in loops so I might be going about it the wrong way, this is my for loop so far:
for char in user_string[:]:
if char[0] in user_string:
removed_string = user_string.strip(char)
print(removed_string)