How to make a rotation equal to a number

Very very simple question but i’ve been absent from unity and cant figure this out… seriously…

transform.rotation = otherobject.rotation;