You can set all three translates or rotates each with a single line of code.
Instead of this:
// Set Translates
setAttr myObject.translateX 10 ;
setAttr myObject.translateY 10 ;
setAttr myObject.translateZ 10 ;
// Set Rotates
setAttr myObject.rotateX 180 ;
setAttr myObject.rotateY 180 ;
setAttr myObject.rotateZ 180 ;
You can combine it all into just two lines, using .t and .r
// Set Translates
setAttr myObject.t 10 10 10 ;
// Set Rotates
setAttr myObject.r 180 180 180 ;
If you're really looking for some fun, try doing it all in one line using the .worldMatrix attribute. :)