I have a list of data and I need to perform a grouping operation two elements at a time. I tried to making it myself, but it takes too much time. I have a large list, so I need a faster way.
Here is an example input:
lst = [["title1","content1"],["title2","content2"],["title3","content3"],["title4","content4"],["title5","content5"]]
and here is an example output:
lst = [["title1","content1 content2"]["title3","content3 content4"],["title5","content5"]]