(prompt="Are you sure you want to proceed? (yes or no): ")
Ask a user if they are sure before doing something.  Return
    whether or not they are sure
Ask a user if they are sure before doing something.  Return
    whether or not they are sure
Ask a user if they are sure before doing something . Return whether or not they are sure
def are_you_sure(prompt="Are you sure you want to proceed? (yes or no): "):
    """
    Ask a user if they are sure before doing something.  Return
    whether or not they are sure
    """
    should_proceed = input(prompt)
    try:
        return string_to_boolean(should_proceed)
    except Exception:
        return False
def are_you_sure ( prompt = "Are you sure you want to proceed? (yes or no): " ) : should_proceed = input ( prompt ) try : return string_to_boolean ( should_proceed ) except Exception : return False