A Simple Rock-Paper-Scissors Game
I'd say there is two major issues in your code.

First one is that main loop which is very unclear, many if statements, filled with continue and quit() , this is spagetthi code and it is makes your code harder to read, so harder to debug, because that jumps everywhere.

The second one is the lack of OOP design, which could be very adapted to this case. Games are usually developped with strongly object oriented languages (Unreal engine uses C++ and Unity uses C# among others) because of the strong interactions between components, and a very favorable context to abstraction and modularity. To be fair, that's not really needed for short games like rock paper scissors but it prevents you to scale the game further.

There is few design improvements I suggest you:

Split your code into functions, first one could be the game winning condition that should be used in your game loop to avoid unwanted infinite loops, common with constant conditions like while True:. Replace this statement instead by while has_game_ended():, with has_game_ended looking like:

    def has_game_ended(player_score: int, ia_score: int) -&gt; bool:
        if player_score == 3 or ia_score == 3:
            print("Game over: {} won!".format("player" if player_score == 3 else "AI"))
            return True
        return False


Then use an enum to list you moves to make them easier to reuse in your code (PAPER makes more sense than 1) and enable comparison using operator overload, note that this is a tricky comparison specific to game rules.

from enum import Enum

class Move(Enum):
    PAPER = 1
    ROCK = 2
    SCISSORS = 3

    def __lt__(self, other):
        return (self is Move.ROCK and other is Move.PAPER) or (self is Move.Paper and other is Move.SCISSORS) or (self is Move.SCISSORS and other is Move.ROCK)


Now you can write:

&gt;&gt;&gt; player_choice = Move.PAPER
&gt;&gt;&gt; ia_choice = Move.ROCK
&gt;&gt;&gt; player_choice &lt; ia_choice
True


and something like

player_score = player_score + int(player_choice &gt; ia_choice)
ia_score = ia_score + int(ia_choice &gt; player_choice)


This works well because it's not comparing two integers anymore, it's comparing two Move, which makes all the difference thanks to operator overloading.

Avoid quit() in your scripts, it totally cuts the code flow and doesn't allow nice error handling, prefer instead loop conditions or try except statements with customized Exception for unexpected behaviors (for example when you use invalid command, as in the example below).

def WrongCommand(Exception):
    pass

if __name__ == "__main__":
    try:
        play()
    except WrongCommand:
        print("Invalid command, exiting program...")