[Solved] Reverse block of text every x lines in python
This is working under the assumption that the number of rows between the text is always consistent. # Open file, split on newlines into a list with open(‘file.txt’) as f: data = f.read().splitlines() # Break list into multiple lists 7 items long # this covers the text and the 6 sets of numbers that follow … Read more