Using Python rjust(8) does not seem to work on last item in list
Using Python rjust(8) does not seem to work on last item in list Problem Description: I have text file containing comma separated values which read and output again reformatted. 102391,-55.5463,-6.50719,-163.255,2.20855,-2.63099,-7.86673 102392,11.224,-8.15971,15.5387,-11.512,-3.89007,-28.6367 102393,20.5277,-62.3261,-40.9294,-45.5899,-53.222,-1.77512 102394,188.113,19.2829,137.284,14.0548,4.47098,-50.8091 102397,-24.5383,-3.46016,1.74639,2.52063,3.31528,16.2535 102398,-107.719,-102.548,52.1627,-78.4543,-65.2494,-97.8143 I read it using this code: with open(outfile , ‘w’) as fout: with open(infile) as file: for line in file: … Read more