I have a list that looks something like this: weather_history=((year,month,day),precip,tmin,tmax)
I need to split it into one-year chunks where each chunk is a list with one years worth of data please help!
all_years_data: List[Weather_List] = []
for line,p,n,x in weather_history:
year=line[0]
day=line[2]
month=line[1]
precip=p
tmin=n
tmax=x
if year not in all_years_data:
all_years_data.append(year)
this is my code so far. I've tried many different things to get all of each years worth of data into one list but can't figure it out