import random
def calculate_score():
worplist = [1, 1, 5]
for worp in worplist:
if worp == 1:
worplist.remove(worp)
if worp == 6:
worplist.append(worp)
print(sum(worplist))
calculate_score()
I want every 1 to be removed but it only removes the first one. Then if I add a 6 to the list it doesn't work at all. Any help?