import pymel.core as pm
s = pm.sphere()[0]
g = pm.group()
g.t.set([5,5,5]) #this is how you set attributes on the node. In this case I'm setting the compound translate attr, called by its short name
#other methods are bound to the object from functions available via the Python API, such as 'setTranslation'
help(s.setTranslation) # use this to see the kwargs available
#set to 5,5,5 in world space. In other words, don't move it
s.setTranslation([5,5,5], space='world')
s.t.get() #
#compare this to the following
s.setTranslation([5,5,5], space='object')
s.t.get()
#Have fun! -JP