2010/1/11 Eknath Venkataramani <eknath.i...@gmail.com>: > correct.txt snippet: > 1 2 1 > 1 3 3 > 1 5 21 > 1 7 19 > > union_output_TEMP.txt snippet: > 1 2 1_NN > 1 3 3_VBZ > 1 3 5_VBZ > 1 3 2_VBZ > 1 5 21_VB > 1 7 19_NN > 1 9 14_VB > > I need to get the output in categorized.txt as: > NN={1 7 19, 1 2 1} > VBZ={1 3 3} > VB={1 5 21} > > in python. > Kindly help
We don't do other's homework (http://in.linkedin.com/pub/eknath-venkataramani/17/1a9/b55), but are willing to give hints. I would give a more clear explanation of what this is supposed to do if you want useful advice. For example, why does NN contain all matching entries when the other 2 only include the first matching entries? Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list