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