First of all, I apologize for the title of the question, which is not clarifying.
I have a list with the names of several files in a folder, of the type: file1_A1, file1_A2, file2_A1, file2_A2, ...
How can I create two lists from this list, one containing all the elements finished with _A1 and one containing all the _A2?
Thank you!