def line_to_int_list(line):
    """
    Args:
        line: A string of integers. Ex: '1 3 5\n'
    Returns:
        A list of integers. Ex: [1, 3, 5]
    """
    data = line.split(' ')
    data = filter(None, data)
    data = [int(x.strip('\n')) for x in data]
    return data