I am trying to extract some data from thousands of text files. I have problem extracting the specific information from the files. 
That is, if I have a list, 

list = [manager ,A, B, C, analyst, F, G, H, Operator, 7, 8]

and want to have a two list :
m\_list= [A, B, C]
a\_list = [F, G, H]

Could someone tell me where my problem is? Thank you. 

I have tried the following code, but I stuck in the first while loop,infinite loop. 

```py
ff = [1,2,3,4,5, 6, 7,8]
mm = []
aa = []
for i in ff :
    while i == 1:
        print(i)
        mm.append(i)
        while i == 4:
            break
    while i == 4:
        aa.append(i)
        while i == 7:
            break

```