This is a program i have been working on but i have had some problems with. When this program is executed it prints the list of skaters and there information twice but i don't want that but i don't know how to fix it
# THESE ARE LISTS TO STORE INDIVIDUAL SKATERS AND THERE SCORES AND MEDIUM
l_list = []
list = []
#STATMENT TO START WHILE LOOP AND TO END IT
re = True
while re == True:
#STORING THE SKATERS NAME AND ADDING OPTION TO STOP ADDING SKATERS IN TO PROGRAM
a_name = input("Please store the skaters name, if there are no more skaters enter 'stop'")
#PRINTING ALL SKATERS AND THERE SCORES AND MEDIUM AND ADDING OPTION TO ADD MORE OR END PROGRAM
if a_name == 'stop':
#were pritn(l_list was)---------------------------------------------------------------------------------------
for s in l_list:
print(*s)
exit = input("Would you like to exit? 'y/n'. ")
if exit == 'y':
break
#WHILE LOOP TO GET SCORES AND STORE THEM IN A LIST
scores = []
repeat = True
while repeat == True:
#ASKING FOR THE SCORES AND A INPUT TO END THIS PROGRAMS FUNCTION WHICH WILL STORE THE SCORES TO THE LIST(scores)
score = input("please type in your scores one at a time, and 'done' when finished.")
if score == "done":
repeat = False
else:
scores.append(score)
#SORTING SCORES, REMOVING HIGHEST AND LOWEST SCORES
scores.sort()
scores.remove(max(scores))
scores.remove(min(scores))
#STORING THE VARIABLE(a_name) AND THE LIST(scores) IN THE LIST(list)
#THEN STORING THE LIST(list) INTO THE LIST(l_list)
list.append(a_name)
list.append(scores)
l_list.append(list)
#CONVERTING THE CONTENTS OF THE LIST(scores) IN TO FLOATS SO THAT IT CAN FIND TEH MEDIUM/AVERAGE SCORE USING LEN AND SUM
#THEN STORING THE VARIABLE(med) INTO THE LIST(list)
scores = [float(i) for i in scores]
med = (sum(scores) / float(len(scores)))
list.append(med)
#RUN FUNCTION
start()
when i run the program with some test results this is what it prints:
[['thomas', ['2', '3', '4', '58'], 16.75, 'renee', ['2', '3', '4', '5', '6'], 4.0], ['thomas', ['2', '3', '4', '58'], 16.75, 'renee', ['2', '3', '4', '5', '6'], 4.0]]
Would you like to exit? 'y/n'.
as you can see it prints it twice which I don't want.