Hi<br><br><div class="gmail_quote">On Dec 29, 2007 3:08 PM, Beema shafreen <<a href="mailto:beema.shafreen@gmail.com">beema.shafreen@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi every body,<br><br>    I have two columns  in a file separted by tabs<br><br>If the column1 is common  in the  row1 and row2  then it should  be column 2 should be displayed in the single line.<br>eg:<br>col 1     col2
<br>
A            1 <br> A             2<br> A            3<br> B            1<br>  C           2<br>  D           3<br>  D           4<br>The result should be <br><br>A    1|2|3<br>B    1<br>C    2<br>D    3|4<br><br>What should I do to get my results
<br><br></blockquote><div><br>Looking at the answer u require , u can clearly make a  dictionary if list datastructure!<br>where dictionary keys are A,B, C ,D  and corresponding values are  list if items (ie., 1,2,3 ...)
<br>Once u have such a dict loaded, its kust a matter of accessing that list via a key and display it joined!<br>HTH<br>KM<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> 
<br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br>