rotation_euler is displayed correctly in "n" panel but not in python
They are the same, but in UI the values are displayed in degrees, in Python it gives you radians.

$ degrees = radians * 180°/π $

$ radians = degrees * π/180° $

The Blender python API gives you radians because the Python trigonometric functions sin, cos, tan, etc. expect radians as input, so it's more convenient in programming.

For humans it's easier to read angles in degrees, so that's why UI uses it.