Fast Risk Battle Simulator
You play with up to 199 dice per player. So most of the time, the attacker will attack with 3 dice and the defender will attack with 2 dice. As long as that's the case, you could simply pick one of the three possible outcomes (with precalculated probabilities) and apply it. Outline:
def _attack_(n_atk,n_def):
    while n_atk &gt;= 3 and n_def &gt;= 2:
        # pick random outcome and update the dice numbers
    while n_atk &gt;0 and n_def&gt;0:
        # same as before
    return [n_atk,n_def]

You could even precompute the result distributions for all \$199^2\$ possible inputs and randomly pick the result according to the given input's distribution. Outline:
def _attack_(n_atk,n_def):
    return random.choices(results[n_atk, n_def], cum_weights=cum_weights[n_atk, n_def])