def list2rofi(datas, sep):
    """
    Convert python list into a list formatted for rofi

    Parameters
    ----------
    datas : list
        elements stored in a list
    sep : str
        separator character

    Returns
    -------
    str
        elements separated by line-breaks

    Examples
    --------

    >>> my_list = [1,2,3,4,5,6]
    >>> list2rofi(my_list]
    "1\n2\n3\n4\n5\n6"
    """

    return '\n'.join(datas)