Python Join List Slice ... To join and replace all strings in a list lst between start index 1 and end index 5, use the one-liner lst[1:5] = [''.join(lst[1:5])] .
確定! 回上一頁