I am trying to write some code which adds an element in one list to another list and then removes it from the first list. It also should not add duplicates to the new list which is where the if statement comes in. However, when adding to the 'individuals' list and removing from the 'sentence_list' list it misses out certain words such as 'not' and 'for'. This is also not random and the same words are missed each time. Any help?
sentence = "I am a yellow fish"
sentence_list = sentence.lower().split()
individuals = []
for i in sentence_list:
if i in individuals:
print ("yes")
sentence_list.remove(i)
else:
individuals.append(i)
sentence_list.remove(i)
print ("individuals", individuals)
print ("sentence_list", sentence_list)