I am working on program which takes user input and replaces the words in a list with 'x'. eg is the word is sucks and user input is "this word is sucks". the output should be "this word is xxxxx.
this is what i have so far. how can i access the elements in the list and match with the user input?
def main():message = []words = ['drat','crap','sucks']counter = 0userInput = str(input("Enter The Sentense: "))truncatedInput = userInput[:140]sentence = truncatedInput.split()for i in range(len(sentence)):