This will work:

    features = layer.selectedFeatures()
    for f in features:
        print f.attributeMap()