I'm extremly new to programming, and I hope someone could help me.
I'm trying to make a game where 2 players need to input words based on the last 2 letters of the word the other player placed into.
I got that part to work, but I cannot get the part which decides the winner. It's the same 2
elif statements but they should print out different results.
Ex. P1: banana P2: narnia P1:ian P2:animal So basically when one of the players fails to accomplish the task of matching the last 2 letters they lose the game
used_words= while True: player_one=raw_input("Player one \n") first= list(player_one) player_two=raw_input("Player two \n") second=list(player_two) if first[-2:] == second[:2] and first and second not in used_words: used_words.append(player_one) used_words.append(player_two) continue elif first[-2:] != second[:2]: print "Player one wins! \n" print "The word you had to match was: ", second break elif second[:2] != first[-2:]: print "Player two wins!" print "The word you had to match was: ", first break else: break