So with pymel, you can actually pass a tuple to the objects component iterator.
import pymel.core as pm
obj = pm.polySphere()
pm.polyExtrude(obj.f[1,3,5,7,9,11, 13:25], ltz=5)
with cmds, you'd need to pass a string for each separate face or group of faces.
from maya import cmds
obj = cmds.polySphere()
cmds.polyExtrudeFacet(obj + '.f', obj + '.f[13:25]', ltz=5)
Both of these will create just one single extrude node in the history.