def sanitize(str, strip=[" "], remove=["\r", "\n"]):
    """Return a whitespace-stripped, newline-stripped string.

    Args:
     str (str): The string to be sanitized.
     strip (str[], optional) Additional things to be stripped.
     remove (str[], optional) Additional things to be removed.
    Returns:
     (str) The sanitized string.

    """
    for stripme in strip:
        str = str.strip(stripme)

    for removeme in remove:
        str = str.replace(removeme, "")

    return str