I'm tyring to take an inputted list of IP's and their corresponding ticket number and turn it into a csv. The ticket(s) for each IP is located on the line below the IP on the list, so how could I read an IP, parse the ticket number below it, and print both those values out in CSV format?

My code and list of IP's/Tix #'s are below. 

```
m = re.search(r'(\d{1,3}.){3}\d{1,3}(-\d{2}|slash\d{2})?',item, re.M|re.I)
n = re.search(r'10A-\d{6}',item, re.M|re.I)
for line in fiEsccb:
    if m in line:
        #go to below line and extract n (possibly multiple)
        print m + ',' + n

```

List

```
8.8.8.8
Open Menu  10A-002671 10/21/2016

8.8.8.8
10A-003079  

8.8.8.8
10A-003179 10A-003178 10A-003172 10A-003171 10A-003170   

8.8.8.8   
10A-002970  

8.8.8.8
10A-002970  

```