Im not sure why my code does not do what I want (I want to return a list of unique items)
B = ["blue", "blue", "red", "green", "red", "blue", "yellow", "green", "blue", "red"]
def makeUnique(list):
unique = []
for i in range(0, len(list)):
if list[i] not in unique:
unique.append(item)
return unique
print makeUnique(B)
It returns
['red', 'red', 'red', 'red', 'red', 'red', 'red']
Edit: idents might be incorrect, when pasting some was missing, so its not a ident error or sth