Obviously, this should be:
name = raw_input("what is your name?")
not
name = input("what is your name?")
.
What you wrote looks like:
if (name == "Kamran" or "Samaneh")
Another good expression is:
if name == ("Kamran" or "Samaneh")
But I also prefer the name in ("Kamran" or "Saman"), as already shown
.
By the way, it can be written:
print("That is a nice name" if raw_input("what is your name?") in ("Kamran","Samaneh") else "You have a boring name ;)")
eyquem
source share