for res in ("pw verified and it is '*sss*' or '' " if i['pw'] in ['*sss',
    ''] else "pw is not any of two'*sss*' or ''" for i in data):
    pass
Finding the values and keys from dictionaries and verifying them