input() function will return the input from the user.
name = input(“Please enter your name.”)
An if – else statement will achieve what you need.
if name == xx:
statement1
else:
statement2
Make sure to note logical operators can be slightly different than mathematical operators in Python (i.e.: “==” instead of “=”)
name = input("Please enter your name.")
if name == "Bond":
print("Welcome on board 007.")
else:
print("Good morning " + name)