After first getting over the hurdle of
duplicate_list = original_list makes a link to the original NOT a copy I managed to get my code to run but now it produces the error message that I've tagged on the bottom of the code. It obviously refers to the 0th item in a list but all the obvious
my_lists seem to be filled with 'cheese' apart from in the original which is has 'goat' as it's  (checked using print statements).
I've been at this for at least an hour and I'm all out of ideas. Any enlightenment would be most welcome.
def remove_duplicates(goats): #work_list = in_list #original list copied to workg version work_list =  for x in goats: #copy input list to a copy That will not affect original work_list.append(x) work_list.sort() #sorted so duplicates will be next to each other result_list =  result_list.append(work_list) #add the first item from the list last_item = work_list #last item added from the original (sorted) list for item in work_list: #iterate through all items in sorted list if last_item != item: #if the current item is not the same as the previous item added to the output list result_list.append(item) #then add current item to output list last_item = item #and update the last item addded variable print "-".join(result_list) return result_list #give function a value findem = ["goat", "cheese", "fish", "goat", "lemon", "pod", "flower", "goat", "polish"] new_list = remove_duplicates(findem) print "> <".join(new_list), print ">" """ OUTPUT (using copy and paste): cheese-fish-flower-goat-lemon-pod-polish cheese> <fish> <flower> <goat> <lemon> <pod> <polish > None """ """ ERROR MSG: Oops, try again. remove_duplicates([4, 5, 5, 4]) resulted in an error: sequence item 0: expected string, int found """