Input from user doesn’t compare with array properly

To check if you an element is present in a list, you can use in.

    while first_bowl == False:
        bowler = input("Who is bowling first?: ")
        if bowler in Team1:
            first_bowl = True
            print('first bowler is {bowler}')
            print("Player not on this team, try again")

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top