私は(python) list of lists以下のように持っています
biglist=[ ['1','123-456','hello','there'],['2','987-456','program'],['1','123-456','list','of','lists'] ]
これを次の形式で取得する必要があります
biglist_modified=[ ['1','123-456','hello there'],['2','987-456','program'],['1','123-456','list of lists'] ]
third element onwards各内部リストでを連結する必要がありますlist comprehensions。
def modify_biglist(bigl):
    ret =[]
    for alist in bigl:
        alist[2] = ' '.join(alist[2:])
        del alist[3:]
        ret.append(alist)
    return ret
これは仕事をします..しかし、それは少し複雑に見えます-ローカル変数retを持ち、del? 誰かがより良いものを提案できますか