def get_safe_filename(title):
    """
    Get a safe string to use as a filename
    :param title: your target file title
    :return: the filename to use
    :rtype: str
    """
    keep_chars = (' ', '.', '_')
    return "".join(c for c in title if c.isalnum() or c in keep_chars).rstrip()