How i read the following data in the the bellow format with for loop.
data = [
[1,'Services',10],
[2,'Cost Elements',20],
[3, 'Rules',30],
[4, 'Manpower', 40]
]
Expected output is::
p = [
[1,2,3,4],
['services','Cost Elements','Rules','Manpower'],
[10,20,30,40]
]
And:
{
id:1,
name:'services',
value:10
},
{
id:2,
name:'Cost Elements',
value:20
},
{
id:1,
name:'Rules',
value:30
},
{
id:1,
name:'Manpower',
value:40
}
Please help ..I am beginner in python so couldn't..