So i am currently using python to create an AI bot, and what i want is for the user to input something like "Hi my name is Bryan" and then i want to set that last word of the input ("Bryan") as a variable for later use. But at the same time i want the code to recognise that they are saying their name, and i have got a bit of that so far. Any help would be greatly appreciated. This is my code for this section
if "My name is" or "my name is" in inp:
name =
print("Hello", name)
("inp" is input btw)