C# Show my Position x and y

Hello guys, my question is how i can show the position of my object player
coordinate “x” and “y” in a Debug.Log
and the code run inside of my obj player

Put somewhere in a script on the player, or make a brand new one this code;

Debug.Log(gameobject.transform.position.x);
Debug.Log(gameobject.transform.position.y);