I have this program that calculates the time taken to answer a specific question, and quits out of the while loop when answer is incorrect, but i want to delete the last calcula
If you have a list of lists (tracked_output_sheet in my case), where you want to delete last element from each list, you can use the following code:
interim = [] for x in tracked_output_sheet:interim.append(x[:-1]) tracked_output_sheet= interim