Question: I have a dictionary with `key1=v1l1, key2=val2, key3=val3, key4=val4`. This dictionary is sorted as `sortedlist = sorted(dict_m.items(), key=lambda x: x[1])`.

Now I am able to print it using

```
for i in sortlist:
    print ('{:11s}'.format(i[0]) ,  ":", i[1])

```

And my output is ;

```
key1=v1l1
key2=val2 
key3=val3
key4=val4

```

What I have to do to get an output in two columns like

```
key1=v1l1  key2=val2 
key3=val3  key4=val4

```

Answer: 
```
dict_m = {
       'key1': 'v1l1',
       'key2': 'val2',
       'key3': 'val3',
       'key4': 'val4', 
       'key10': 'v1l10',
       'key20': 'val20',
       'key30': 'val30',
       'key40': 'val40',
       }
sorted_m = sorted(dict_m.items())
sorted_mLng = len(sorted_m)
odd = lambda i: (((i < sorted_mLng) and sorted_m[i]) or ('N/A', 'N/A'))
[ print(f"{a[0]} = {a[1]}\t{b[0]} = {b[1]}") 
for a, b in [ (sorted_m[i], odd(i+1))
for i in range (0, sorted_mLng, 2)] ]

```

or as three columns .....or or or...

```
odd = lambda i: (((i < sorted_mLng) and sorted_m[i]) or ('N/A', 'N/A'))
[ print(f"{a[0]} = {a[1]}\t{b[0]} = {b[1]}\t{c[0]} = {c[1]}") 
for a, b, c in [ (sorted_m[i], odd(i+1), odd(i+2))
for i in range (0, sorted_mLng, 3)] ]

```
Try this:

```
for i in [sortedlist[i:i+2] for i in range(0,len(sortedlist), 2)]:
    print(f"{i[0][0]}={i[0][1]}\t{i[1][0]}={i[1][1]}")

```