I am trying to output a string from a tuple with different widths between each element.
Here is the code I am using at the moment:
b = tuple3[3] + ', ' + tuple3[4] + ' ' + tuple3[0] + ' '
+ tuple3[2] + ' ' + '£' + tuple3[1]
print(b)
Say for example I input these lines of text:
12345 1312 Teso Billy Jones
12344 30000 Test John M Smith
The output will be this:
Smith, John M 12344 Test £30000
Jones, Billy 12345 Teso £1312
How can I keep the padding consistent with larger spacing between the 3 parts?
Also, when I input these strings straight from a text file this is the output I recieve:
Smith
, John M 12344 Test £30000
Jones, Billy 12345 Teso £1312
How can I resolve this?
Thanks alot.
\t', John M 12344 Test £30000'