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])]. This solution is based on slice assignment that selects the slice you want to replace on the left and the values to replace it on the right side of the assignment. … Read more