Code:
str1 = input("Please enter a full sentence: ")
print("Thank you, You entered:" , str1)
str2 = input("Now please enter a word included in your sentence in anyway you like: ")
if str2 in str1:
print("That word was found!")
else:
print("Sorry, that word was not found")
I have done some research on forums etc and the only solutions i can find for this subject are converting words into uppercase/lowercase. I don't want to do it like that.
I want something that will ignore the fact that it is uppercase or lowercase and will assume it to be the same word, so when someone inputs a sentence it will automatically assume it t be the same word. For example: (Treat = treat, TREAT, TreAT etc). So it will essentially read the characters in the word and will ignore the uppercase/lowercase letters.
I do have something (string.ascii_letters) which i think might do it, but if anyone know any better way of doing it then that would be greatly appreciated! :)