def opt_b_private():
next(data_file)
for row in data_file:
list_data = row[1:3]
list_lol.extend(list_data)
list_b =list(map(int,list_lol))
sum_b = sum(list_b)
length_b = len(list_b)
average_b = sum_b / length_b
print(f'the number average number of private dentist in 10 year span from 2010-2019 is {average_b} dentist')
this was the error when i run it a second time but run it first time it was ok.i do not know how to solve the issue for this an anyone help me ? thank you!
File "C:\Users\hongi\inputproject.py", line 24, in opt_b_private
next(data_file)
StopIteration