One way could be:
d = QgsDistanceArea()
d.setEllipsoid('WGS84')
layer = iface.activeLayer()
features = layer.getFeatures()
for feat in features:
print(
d.convertAreaMeasurement(
d.measureLength(feat.geometry()),
1
)
)