import maya.cmds as cmds

#create cylinder 8 subdivisions axis
cylinder = cmds.polyCylinder(sx=8, sy=1, sz=1);

#select edges
cmds.polySelect( cylinder, edgeRing=(24, 26, 28, 30, 32, 34, 36, 38));

#delete selection
cmds.delete();
d885e9c4e01d693211c05e99d45a2dced3750953
<mask token>

<mask token>
cmds.polySelect(cylinder, edgeRing=(24, 26, 28, 30, 32, 34, 36, 38))
cmds.delete()

<mask token>
cylinder = cmds.polyCylinder(sx=8, sy=1, sz=1)
cmds.polySelect(cylinder, edgeRing=(24, 26, 28, 30, 32, 34, 36, 38))
cmds.delete()

import maya.cmds as cmds
cylinder = cmds.polyCylinder(sx=8, sy=1, sz=1)
cmds.polySelect(cylinder, edgeRing=(24, 26, 28, 30, 32, 34, 36, 38))
cmds.delete()

import maya.cmds as cmds

#create cylinder 8 subdivisions axis
cylinder = cmds.polyCylinder(sx=8, sy=1, sz=1);

#select edges
cmds.polySelect( cylinder, edgeRing=(24, 26, 28, 30, 32, 34, 36, 38));

#delete selection
cmds.delete();