I am trying to get a list with a specific output from an index in another list, for example:
L = [(0, 1, 2, 3, 4, 5), (6, 7, 8, 9, 10,...etc), (...etc)]
multiple_index = [entry[0, 3, 4] for entry in L]
#----> I know this specific code is wrong
I would love it if the above code could output:
[(0, 3, 4), (6, 9, 10), (...etc)]
I want the individual sub-indices from each index in the main list to be grouped as shown, if that is at all possible, and am wondering what code I could use to properly pull this off, thanks.
EDIT: Also, How could I format it to display as rows cleanly, I am outputting them to a text file using .writelines and a separate output line, thanks again!