# Why are we choosing more than 1 action in SARSA?

Here is the pseudocode for SARSA (which I took from here)

Why are we choosing more than 1 action in SARSA? One for going into the next state and the other one for updating the Q function?

The appearance of two Choose statements is an artifact of the loop design and variable management in the pseudocode.
However, you need to have two actions in scope - the current action (just taken and observed) and planned next action, in order to process the update rule. Hence there are two variables a and a' and the code needs to generate one or other outside the main loop, or have some other way to ensure that it has access to current and next values. This is also why at the end of the loop, the "next" values $$s', a'$$ get copied to the "current" values $$s, a$$.