I have a list in a variable, lets call it "StimList". The list has 80 lines, and each line has 3 items, all 3 items are words. For example lines 1-4 might look like:
file.bmp, file2.bmp, distinct
file3.bmp, file4.bmp, distinct
file5.bmp, file6.bmp, typical
file7.bmp, file8.bmp, typical
I'm trying to write some code that looks at each line, and puts that line into a new list based on the content of the third item (i.e. in this case distinct/typical). So the result would be two lists, one with all the distinct lines in and one list with all the typical lines in. However, I want to do use code that does this for all unique words as the third item, not just distinct and typical. So, for example, if the third line could contained one of three words, e.g. bird, cat, dog rather than two words e.g. distinct, typical. In case that's unclear, if I know in advance what the words in the third item were, I could use code that looks like something like this:
Code: Select all
repeat for each line thisline in StimList
if item 3 of thisline is distinct then put thisline after variable1
if item 3 of thisline is typical then put thisline after variable2
end repeat
Thanks in advance!
Symiant