How to turn a single eulerAngle measurement of a moving game object into a variable?

print (transform.eulerAngles);

This of course prints three numbers to the console. I need the second number-- the "y"-- to use as a variable in a calculation of a new value. How do I obtain/get the y value (which is ever-changing as it's from a moving object) and assign it a variable name?

Not quite sure if this is actually what you want, but anyway

print (transform.eulerAngles.y);

float y = transform.eulerAngles.y;