import getpass


def password(what):
    """Prompt the user for a password and verify it.

    If password and verify don't match the user is prompted again

    Args:
        what (string) : What password to enter

    Returns:
        (string) : Password
    """
    while True:
        pass_ = getpass.getpass("{} Password: ".format(what))
        pass__ = getpass.getpass("Verify {} Password: ".format(what))
        if pass_ == pass__:
            return pass_
        else:
            print("Passwords didn't match, try again.")