I have the following code: 

```
population = [[[0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1], [1], [0]],
 [[0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1], [3], [1]],
 [[0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0], [4], [2]],
 [[1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0], [3], [3]]]

def CreateDictionary(population):
   d=dict()
   for ind in range (0, len(population)):
       g = ','.join(str(ind[0][1]) for ind in population)
       f = ','.join(str(ind[1][1]) for ind in population)
   d[g] = f
   return (d)

```

The result I get is: 

```
{'[0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1],
[0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1],
[0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0],
[1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0]': '[1],[3],[4],[3]'}

```

What I am trying to do is to create a dictionary using the first and second element for each part in the list (the third can be ignore) and assign one to the other, such as: 

```
    d={'0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1': 1, 
'0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1': 3} and so on...

```

The first element (the binary sequence) can be text, it doesnt matter, but the second needs to be in a format that I can use to calculate other stuff. Since I am trying to do mathematical operations in this list form and its also not working.

I tried many things in other ways, but I get several errors while trying to run the code, this is the only way I could make it run but its not even close to what I wanted. Any thoughts on how I could approach this?

Thank you!