How to format the output in a for loop

299 Views Asked by At

Hello I have this output as below:

NixonOp      11.99      Operations
Cable Management      29.59      IT Department
Server Maintenance      30.5915      IT Department
Management Lessons      89.541      Management
O-Class      155.514      IT Department
MngAPP      174.99      IT Department

I would like to be this way:

NixonOp              11.99      Operations
Cable Management     29.59      IT Department
Server Maintenance   30.5915    IT Department
Management Lessons   89.541     Management
O-Class              155.514    IT Department
MngAPP               174.99     IT Department

The problem is that all the values that are shown here are part of 3 vectors, one for the name, one for the price and one for the department (last column) and are outputted by using a for loop. Is there any way to make it look like this?

0

There are 0 best solutions below