Q:

invalid syntax on =?

i am a beginner at python trying to make a very simple program using yes/no. it says that there is a syntax error on the first = in the line:
if monkeya="yes" and monkeyb="yes":

here's my entire code.    
monkeya=input("is monkey A smiling? (yes or no) ")
monkeyb=input("is monkey B smiling? (yes or no) ")

if monkeya="yes" and monkeyb="yes":
   print("unsafe - plotting")

elif monkeya="no" and monkeyb="no":
   print("unsafe - angry")

else:
   print("safe")

A:

Equality test requires a double ==, you used single =:
if monkeya=="yes" and monkeyb=="yes":
   print("unsafe - plotting")

elif monkeya=="no" and monkeyb=="no":
   print("unsafe - angry")

A single = equals sign is an assignment statement, which you cannot use inside of an expression (so not after if).

A:

You should use double equals sign on comparing two values:
if monkeya == "yes" and monkeyb == "yes":

