How to set up a position or rotation just for one coordinate?

I have this script:

plX = player.localPosition.x
plY = player.localPosition.y
player.position = [plX, plY, 0.12]

plRZ = player.localOrientation.to_euler()[2]
player.localOrientation = [0, 0, plRZ]

I wanted to change just the Z coordinate for the local position and X and Y for the local orientation.
The thing is I have to call the other coordinates.
is there a way how to set the coordinates individually?