I need help to fix this "index out of range" problem in this double for loop code I have.
aList = ["G", "D", "A", "G", "A", "B"]
for i in range(0, len(aList)-1):
for j in range(i+1, len(aList)):
if aList[i] == aList[j]:
removeThis = aList[i]
aList.remove(removeThis)
Basically I want to get the first non-repeating string in aList, which is supposed to be D in this case. Thank you in advance!
( edit ) : I saw many help given by using built-in Python functions, but I'm trying to do this code without built-in functions for learning purposes.