I have a CSV file of statistics that I am running a loop through to get the name, session, amount of time for reps, and count of reps of a person doing push-ups and situps. Each time the loop is run through the list is updated with the next line of statistics. Is there a way to find the average time per session.
**For example output:**
bob session1 average 20 seconds average 10 pushups
bob session2 average 40 seconds average 18 situps
**Lists being looped through:**
lst = ['Bob',session 1, '10seconds', '5 pushups']
lst = ['Bob',session 1, '30seconds', '15 pushups']
lst = ['Bob',session 2, '25seconds', '10 situps']
lst = ['Bob',session 2, '55seconds', '25 situps']
I was thinking of making a key = lst[1] that will record the session and work from there but I can't make sense of how I would do that. Any ideas help, sorry for such a trivial question I am very new.