Click here to Skip to main content
15,067,832 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I am making a python program and I want it so if the player has 1, 2, and 3 in its move list it will end the game.

What I have tried:

if "1" and "2" and  "3" in pmoves:
        pwin = True

The problem is if I just do move 3 it ends the game. Whats wrong?
Posted
Updated 6-Jul-21 18:55pm

1 solution

Try the following
Python
if "1" in pmoves and "2" in pmoves and "3" in pmoves:
        pwin = True
   
Comments
CPallini 7-Jul-21 3:31am
   
5.
Wendelius 8-Jul-21 5:23am
   
Thank you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900