how to achieve this result
I am wrking on small project using Python2.6.Finally my list is like this.

list = ['1:Rammmm,mmmm', '2:surr.rrrrr', '3:Sam ttttt',
'1:qqqq qqqqqqq', '2:wwwwwwwwwww', '3:eeeeeeeee','4:tttttttt',
'1:zzzzzzzzzzzzz', '2:xxxxxxxxx']

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.

{Rammmm,mmmm|qqqq qqqqqqq|zzzzzzzzzzzzz}

{surr.rrrrr|wwwwwwwwwww|xxxxxxxxx}

{Sam ttttt|eeeeeeeee}

{tttttttt}

How to achieve this in Python.

Thanks.
how to achieve this result
===

I am wrking on small project using Python2.6.Finally my list is like this.

list = ['1:Rammmm,mmmm', '2:surr.rrrrr', '3:Sam ttttt',
'1:qqqq qqqqqqq', '2:wwwwwwwwwww', '3:eeeeeeeee','4:tttttttt',
'1:zzzzzzzzzzzzz', '2:xxxxxxxxx']

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.

{Rammmm,mmmm|qqqq qqqqqqq|zzzzzzzzzzzzz}

{surr.rrrrr|wwwwwwwwwww|xxxxxxxxx}

{Sam ttttt|eeeeeeeee}

{tttttttt}

How to achieve this in Python.

Thanks.