data file looks like the below. Note that the tags and values are not necesirly fixed (i.e. one file may have 10, next 30, 31 etc)
{
1=6487490
2=905629
3=14959
4=85
7=1
8=
9=
16=1
20=1252903800
21=557
22=13
}
i want output like this using python2
1, 2, 3,4,5,8,9,16,20,21,22
6487490,905629,14959,85,1,,,1,1252903800,557,13
where all the tags and values are converted to the csv structure.