I think you should be using name_choice
here instead of name
if name == "Sam":
print ("Your name is Sam")
What is the name
variable meant for anyway?
A good tip when something like this happens is to print the things you are comparing right before the if
eg
print ("name ==", name)
if name == "Sam":
print ("Your name is Sam")
This would have made it apparent that you are comparing a list to a string
solved Why doesn’t the result of input() match what I expect to get? [closed]