I am working on small project using Python 2.6. Finally my list is like this.
data = ['1:Rammmm,mmmm', '2:surr.rrrrr', '3:Sam ttttt',
'1:qqqq qqqqqqq', '2:wwwwwwwwwww', '3:eeeeeeeee','4:tttttttt',
Here, I want to display all 1's in one line, all 2's in one line, etc., with pipe"|" as separator. It should be like this with sorting order.
How can this be achieved in Python?