I am trying to find all of the indexes of items that occur only once in a python list.
If my list is: list = [1,1,1,1,2,2,2,2,3,4,5,6,6,6,6,]
I want to return a list of indexes for the items that occur only 1 time: singleItems = [8,9,10]
I am sure there is some cheeky pythonic way to do this. Can anyone help?
Read more here: https://stackoverflow.com/questions/65920706/is-there-a-way-to-get-the-indexes-of-all-single-items-in-a-python-list
This content was originally published by miltonjbradley at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.