I am trying to remove the last item of a list/array even if there are duplicate items
EG
list = ["h","e","l","l","o"," ","t","h","e","r,"e"]
It would remove the final "e"
but not the second and ninth "e"
I have already tried
finalSentence.remove([finalSentence[len(finalSentence)-1]])
However this removes a random letter, I know this is because it is removing a letter rather than item number and python does not know which one to choose so it is a random one that is removed. But I do not know another way to get this to work