import turtle #import example=turtle.Turtle() example_y = example.ycor #ycor returns the y position of your turtle object
Here is what the above code is Doing:
1. It creates a turtle object called example.
2. It creates a variable called example_y that stores the y position of the turtle object example.
3. It prints the y position of the turtle object example.