I've created this code to analyse an input sentence to allow for the user to search for a certain word within it. However, I can't seem to figure out how to make it so all the punctuation in the input sentence is disregarded. I need this because, if a sentence such as "hello there, friend" is input, the word "there" is counted as "there," and so if the user is searching for "there" it says it is not in the sentence. Please help me. I'm really new to python.
print("Please enter a sentence")
sentence=input()
lowersen=(sentence.lower())
print(lowersen)
splitlowersen=(lowersen.split())
print (splitlowersen)
print("Enter word")
word=input()
lword=(word.lower())
if lword in splitlowersen:
print(lword, "is in sentence")
for i, j in enumerate (splitlowersen):
if j==lword:
print(""+lword+"","is in position", i+1)
if lword not in splitlowersen:
print (lword, "is not in sentence")