How to access relative nodes

hifrens.,

im trying to change the number of sections of a circle that is selected.

step 1: i stored the selected circle in in a variable ‘selectedCircle’.

import maya.cmds as mc
selectedCircle=mc.ls(select=True)

but it is accessing the transform node only.

how can we access the relative nodes( means if I have the transform node say 'nurbsSphere1, i have to access the ‘nurbsSphereShape1’ and ‘makeNurbsSphere1’)

and tell me how to access the parent/child nodes.

thanks in advance.

shape=mc.listRelatives(selectedCircle[0], children=True)
historyarray=mc.listHistory(shape)

thanQ.I got It.