How can I get the string value of my player index (PYTHON ALGO)

Simple question,

I’m parsing the state for my own units and would like to store whether I am “p1” or “p2” at the beginning of the game. So far I only see the variable player_index which is either 0 or 1. In many cases I am playing as p2 and need to use the string p2 to access the data I need.

At the moment I am checking the Y value at spawn frame to see which player is which.

I know this might be an easy one, thanks in advance!

edit: realizing now that I think I am always p1 in game then in the replays I will be given my true player index.

Yes, this is correct, the p2 and p1 are only important for replays.