Creating dictionary with list as values
<p>I have a bind file in below format</p>
<pre><code>BIND REQ conn=8349228 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=test1,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349229 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=test1,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349230 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=xdev,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349231 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=xdev,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349232 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=COVESEOS,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349233 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=xdev,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349235 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=xdev,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349234 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=COVESEOS,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349236 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=COVESEOS,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349237 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=xdev,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349238 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=xdev,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349239 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=COVESEOS,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349240 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=xdev,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349241 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=xdev,ou=Users,ou=Internal,o=example&quot;
BIND REQ conn=8349242 op=0 msgID=1 version=3 type=SIMPLE dn=&quot;uid=xdev,ou=Users,ou=Internal,o=example&quot;`
</code></pre>
<p>Now what I am trying to do is create a dictionary of the format <code>{'uid' : [connections ids]}</code>, for example like below</p>
<pre><code>{'test1' : [8349228,8349229,...],
 'xdev' : [8349230,8349231,...],
 ...so on  }`
</code></pre>
<p>What can I try to resolve this?</p>