I have imported a file containing 8 columns, each column separated by ' '
, so during import all ' '
are replaced by 'space'
and '
'
are split to make indexing easier for me. Then a list is generated form input file for further analysis. But after analysis I got
lst = ['PAIR', '1MFK', 'URANIUM', '82', 'HELIUM', '112', 3.6997']
kind of list, so I put
final = ' '.join(lst)
to get the values like PAIR 1MFK 1 URANIUM 82 HELIUM 112 3.6997
But when I print all values it comes as following
PAIR 1MFK 1 URANIUM 82 HELIUM 112 3.6997
PAIR 2JGH 2 PLUTONIUM 98 POTASSIUM 88 5.3003
PAIR 345G 3 SODIUM 23 CARBON 14 1.664
PAIR 4IG5 4 LITHIUM 82 ARGON 99 2.5506
here the column entries don't lie just one below another however indentation is same for all.
I have tried with ' '
but that produce same randomized result.
please help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…