layer = iface.activeLayer() for feat in layer.getFeatures(): if feat["index"] > "0": print(feat["index"])