Question: how to convert list1 to list2?

```
list1 =[[1, 11], [2, 22], [3, 33], [4, 44]]
list2 = [[{1:2},{11:22}],[{3:4},{33:44}]]

```

key of list 2 is odd elements of list1, while value of list2 is even number of list1

I've tried like below, but get different list3.

```
def f(list1):

    newlist=[]
    for i in range(0, len(list1), 2):
        dict1={}
        for j,key in enumerate (list1[i]):
            dict1[key]=list1[i+1][j]
            newlist.append(dict1)  
    print newlist

f(list1)
[{1: 2, 11: 22}, {1: 2, 11: 22}, {33: 44, 3: 4}, {33: 44, 3: 4}]

```

Answer: 
Create **List--> List--> dictionaries** from the given list, consider 0th item is Key from the list1 and 1st item is value.

1. Iterate every item from the `list1` by **enumerator** because we want index of every item from the `list1`.
2. Process on only those items which index is even means 0, 2, 4, ..
3. Create **list of dictionary’s** from the Current Item and Next Item of the `list1`
4. Append list of dictionary’s into `result` list.
5. **Handle exception** for Index Error.

Demo:

```
>>> list1 =[[1, 11], [2, 22], [3, 33], [4, 44]]
>>> for i, value in enumerate(list1):
...     if i%2==0:
...         try:
...             result.append([{value[0]:list1[i+1][0]}, {value[1]:list1[i+1][1]}])
...         except IndexError:
...             print "Index Over"
...             break
... 
>>> result
[[{1: 2}, {11: 22}], [{3: 4}, {33: 44}]]

```
```
newlist=[]

for i in range(0, len(list1), 2):
   dict1={} 
   for j,key in enumerate (list1[i]):
        dict1[key]=list1[i+1][j]
   newlist.append([dict1])
print newlist

```

update my coding, from newlist.append(dict1) under 2nd for to newnlist.append([dict1]) under 1st for