Context: mouse genetics, I want to count the # of mutations between two lab strains depending on whether they land within exon borders.

So far, I generated 2 lists:

`SNPs = [432, 534, 677, 788, 999]` etc ~2e7 values total

`exon_limits = [(3, 6), (42, 444), (679, 999)]` etc ~5e5 values total

I simply want to count the number of SNPs (list1) that fall within exon limits (list2). Here is my code:

```
exonic = 0
non_exonic = 0
for k, l in exon_limits:
    for j in SNPs:
        if j <= k or j >= l:
            exonic += 1
        else:
            non_exonic += 1

```

I don't know much about the limits of computer science but 2e7 \* 5e5 is *probably* too much to handle, right?. Also, I attempted:

```
exonic = 0
non_exonic = 0
for k, l in exon_limits:
    for j in SNPs:
        if j <= k or j >= l:
            exonic += 1
            print exonic
        else:
            non_exonic += 1

```

To see where along the algorithm python is at, but it seems it just counts up from 0 -> over 7e6 before I interrupted the program. 

Each SNP will only fit within a single tuple, so if there is a way to get the iteration to stop once it finds a hit that would speed things up. Any help would be greatly appreciated!